JUnitX Example - Step 5

The preferred way to execute the tests is starting the Swing UI of JUnit. To do that compile the classes using a command like

    javac -classpath junit-3.7.jar:junitx-5.1.jar *.java

Run the GUI using a command like

    java -classpath junit-3.7.jar:junitx-5.1.jar:classes junit.swingui.TestRunner junit.demo.TestPackage

It provides a tree of all test cases based on the TestPackage class used as argument for the UI. The Swing UI shows passed tests, failures and errors including the respective exceptions. Single tests, subtrees of tests and the whole test suite can be rerun to explore problems.

Continue with step 6 . . .

© 2001 A. Heilwagen