SE450: JUnit: Running Tests with the GUI [37/41] Previous pageContentsNext page

To run the tests with the JUNit GUI, you have two options. You can run the AWT GUI, or the Swing GUI.

For AWT, run

java junit.awtui.TestRunner
For Swing, run
java junit.swingui.TestRunner

Just like above, you need to have junit.jar and your compiled tests and code in your classpath in order to run the tests. The swing version of the JUnit GUI will automatically search your classpath for test cases, generating a list so you can pick the tests to run from the GUI. If you see red, your test failed. Green, it passed.

Previous pageContentsNext page