Component test projects serve as a grouping mechanism for the test artifacts that you create using the automated component testing features. Test projects also serve to 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. The test project is linked to one or several Java projects that contain the components you want to test.
To create a new component test project:
The new test project is displayed in the Package Explorer view of the Java™ perspective and the Test Navigator view of Test perspective.
Test projects contain both execution-oriented artifacts (test runs and test suites) and code-oriented artifacts (test behavior scripts and stubs). The execution-oriented artifacts are viewed in the Test Navigator, while the code-oriented artifacts are viewed in the Package Explorer.
![]() |
![]() |
Before moving on to the next exercise, lets make sure you understand what these artifacts are.
A run is an artifact that gets created when you run a test. A run is the consolidated results of one test execution and may incorporate several test suites, test cases, and individual tests.
A test suite is a grouping mechanism that is used to organize the artifacts that get created when you create test projects and tests. A test suite contains test cases, stubs, and test deployment data.
A behavior is the actual Java source code that is created at the time of test generation.
A stub is a class that is used as a replacement for a class that interacts with the class under test.
To simplify your work with component testing, you can add the Package Explorer view to the Test perspective. To do this, go to the Test perspective; then click Window > Show View > Other > Java > Package Explorer.
Now you are ready to begin Exercise 1.2: Creating a Java component test.