Running a JUnit Test

See Also 

Once you have created a test or test suite, you can use the Run Test command to initiate execution of the test. Run Test commands are available on source nodes only.

To run tests for an entire project:

  1. Select any node or file in the project you want to test in the Projects or Files window.
  2. From the main menu, choose Run > Test project_name (Alt-F6).

    The IDE executes each of the project's tests.

To run a test for a single class:

  1. Select the node of the class for which you want to run a test in the Projects or Files window.
  2. From the main menu, choose Run > Run File > Test classname (Ctrl-F6).

    The IDE executes the test using.

Working with JUnit Test Output

When you run a test, the IDE shows output into two tabs:

To work with the JUnit test window:

See Also
Creating a JUnit Test
About Running Java Applications

Legal Notices