Generating an executable test

Follow this procedure to generate an executable test. Before a test can be run, the test's Java source code must be generated and compiled. This process is called code generation.

Before the test's Java code can be generated, a location for storing the code must exist. By convention, this is a folder named src located in the same Java project as the test. If no source folder named src exists in any existing Java project, you must create one as explained in Creating a new source folder. Once the test's Java source code is generated, the Eclipse IDE automatically compiles the source code into an executable test.

To generate a test's source code:
  1. In the Test Navigator, right-click the test to be run and select Generate. The JUnit Test Definition Code Generation dialog box opens.
  2. In the Java Project field, accept the default or click Browse to select the Java project in which to store the test code.
  3. In the Source folder field, accept the default or click Browse to select the folder in the selected Java project in which to store the test code.
  4. Click Finish.

Parent topic: Performance Testing with TPTP

(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.