JUnit (Pete's notes)

Web to the JUnit home page.

Download junit3.8.1.zip. The JUnit docs like to live in a web tree, so save it in /usr/web (!!!!).

(as siemsen)
cd /usr/web
unzip junit3.8.1.zip
rm junit3.8.1.zip
ln -s junit3.8.1 junit
Point a browser at the new local JUnit web page. Near the bottom are instructions for installation and testing.
export CLASSPATH=/usr/web/junit/junit.jar:/usr/web/junit
java junit.textui.TestRunner junit.samples.AllTests
java junit.awtui.TestRunner junit.samples.AllTests
java junit.swingui.TestRunner junit.samples.AllTests
Ok, so it's installed and tested. Read the web page some more to figure out how to use it. Also, lookit the local junit API pages. By looking at these, I was able to construct a basic test case. Using "fixtures" and "suites" you can do more involved testing.

To use junit from ant, see the JUnit optional task documentation. You'll have to find jakarta-ant-1.4.1-optional.jar on the Internet and move it into $ANT_HOME/lib, and do this:

cp /usr/web/junit/junit.jar $ANT_HOME/lib

Pete Siemsen
Last modified: Sun Oct 20 11:18:58 MDT 2002