Using JUnit with IDEs

Your IDE should have built-in support for JUnit version 4. You may have to specify to user version 4 in global settings, project-specific settings, or on the screens for performing the individual JUnit tasks.

There will be an operation to create a new JUnit test class. If you specify the target class to be tested by your new test class (often defaults to the class you currently have selected), you can then select methods in the target class to be tested, and the IDE will make template test methods intended to test each one. In most cases, you will want more than one test method to test a single method of the target class. You can, of course, make as many additional test methods as you want to, manually.

To execute the test-runner, you specify the target test class or test classes, using any of various methods. With Eclipse, you do this under the Run / Run Configurations... menu.


$Revision: 2422 $