About JUnit

See Also

The IDE provides built-in JUnit support for generating and executing unit tests based on the JUnit framework. The JUnit framework is an open source product that supports development of tests and provides a harness for running these tests.

The IDE supports JUnit 3 and JUnit 4 unit testing. For more information about JUnit, see:

Test Types in the IDE

You can use the IDE to create the following:

You can generate and navigate to tests by selecting any class or package node in the Projects window and choosing from the Tools > JUnit menu.

JUnit Test Structure

The IDE represents unit tests as subtrees which mirror the project's Java package structure. Each test class has the name of the class it is testing appended by the word Test (for example, MyClassTest.java).

Each standard project has a default test folder that is used to store your tests. This folder is displayed as the Test Packages node in the Projects window. You can add any number of test folders to your project. Test files must be located in a separate source tree than the source files they test.

See Also
Working with JUnit
JUnit Tasks: Quick Reference
About Debugging Java Applications
Mobility Pack: About JMunit

Legal Notices