Exercise 1.1: Creating a test project

Component test projects serve as a grouping mechanism for the test artifacts that you create using the automated component testing features. The test project is linked to one or several Java projects that contain the components you want to test. 

  1. From any perspective, click File > New > Project > Component Test > Component Test Project and click Next.
  2. In the Create a Component Test Project wizard page, supply a name for the project and click Next to accept the default storage location or uncheck the Use default check box, specify a desired location, and click Next.
  3. In the Define the Scope of Component Test Project page, select the components that can be used to create tests or stubs within this project and click Finish.

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.

Test Navigator 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.

Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.