This topic describes how to create and run a JUnit test configuration.
To run a JUnit test:
- From the menu bar, click . The Run dialog
box opens.
- In the Configurations pane on the left,
click Test.

- Optionally, in the Perspectives tab, you can associate the three
launch modes (Debug, Run, and Profile) with different workbench perspectives
by clicking the appropriate arrow and selecting the perspective from the drop-down
list.
- To create a new configuration, click the New button
on the bottom left.
A new test configuration, initially
named New_Configuration, is created. Change the name
if you like. Alternatively, expand Test and click a
listed configuration that you want to inspect or modify. The Run dialog box
opens in the Test tab.

- In the Select Test to run pane in the middle
listing all projects in the workspace, navigate to the project containing
the test to run and click it.
- In the Select a deployment pane on the right
listing all defined deployments in the workspace, click the one to use for
this run.
To run the test using default values, or using the
same values that you set during the previous test run, you can click Run now
and stop reading.
- Click Execution Results to display that
tab, as shown below.

- In the Location box navigate to the folder
where you want to store the test results file, and enter a name for the file
in the Name field. Select Override existing
Execution Results resource to overwrite the test results file
each time you run the test configuration.
- Click Common to display the Common tab,
as shown below.

- When you run a test configuration, Eclipse creates a file, with
a .launch suffix, containing metadata. If you select Local,
Eclipse stores this file in your workspace's metadata folder, which is not
visible to other users. If you want other users to have access to the file,
select Shared, click Browse,
and navigate to a folder in your workspace where you want to store the file.
- To have the test configuration appear in the Run, Debug,
or Profile favorites toolbar menus, select the appropriate
boxes.
- Select Launch in background to have Eclipse
run the test configuration in the background so that you can perform other
Eclipse tasks while the test runs.
- Click Apply to save the settings for the
configuration.
- Click Run.