Creating new component test projects

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:
  1. From any perspective, click File > New > Project > Component Test > Component Test Project or Plug-in Component Test Project if you are testing an Eclipse plug-in. Click Next.
  2. If you receive the Confirm Enablement dialog, click OK to enable the component test capability.
  3. 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.
  4. 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.
  5. Click Finish.
  6. 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.

Related concepts
Test-generation process
Standard Java test patterns
Test patterns for Enterprise JavaBeans
Automated component testing
Related tasks
Changing the scope of a test project
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.