Test projects group the test artifacts that are generated when
you create a component test. Test projects also define the scope of the test
project by limiting the number of files that will be analyzed when you create
tests or stubs, especially when you have many projects or large projects in
your workspace.
To create a new component test project:
- From any perspective, click or Plug-in
Component Test Project if you are testing an Eclipse plug-in.
Click Next.
- If you receive the Confirm Enablement dialog, click OK to
enable the component test capability.
- On the Create a Component Test Project wizard
page, take one of the following actions:
- Supply a name for the project and click Next to
accept the default storage location.
- Clear the Use default check box, specify a
desired location, and click Next.
- On the Define the Scope of Component Test Project page,
select the components that can be used to create tests or stubs within this
project. The scope lists projects or parts of a project that will
be linked to the test project. You can also select working sets that you have
previously created in your workspace.
- Click Finish.
- If prompted to change to the Test perspective, click Yes.
The new test project is displayed in the Package Explorer view
of the Java™ perspective and the Test Navigator view of the
Test perspective.
Note: When you create the component test project, the
Java build path is updated to include the component test libraries. These
libraries include the JAR files for supporting JUnit and IBM component tests.
If you experience class path errors, verify that these libraries are configured
properly.
To view the Java build path, right-click the test project
in the Test Navigator, click Properties,
and then click Java Build Path.