Running JUnit tests at the command line


On the CSL workstations:

  java -cp .:/home/graderjd/bin/bluej/lib/junit.jar junit.textui.TestRunner ClimberTest

Explanation:
java Invoke the JVM
-cp classpath option
. use current directory to find your class files
: path separator.  On Unix it's a colon, on Windows it's a semicolon
/home/graderjd/bin/bluej/lib/junit.jar location of JUnit JAR file
junit.textui.TestRunner name of JUnit test runner application
ClimberTest Your JUnit test you want executed



On your personal computer:

Change the path to the JUnit JAR file to it's location on your machine.  For a typical BlueJ installation under Unix, it's in
/usr/local/bluej/lib/junit.jar