Adding tests to an existing test suite

After you create a Java™ test suite, you can always go back add new test cases to it. This also allows you to mix, for example, scenario-based tests with method-level tests within a single test suite. Adding a test case to an existing test suite involves using a wizard to append new methods to the corresponding test behavior script.

To add a test, you must have an existing test suite and the corresponding test behavior script must be compilable. The new test must have the same scope as the existing test suite. You can only automatically add tests to Java component test suites.
To add new test cases to an existing Java test suite:
  1. Open the Package Explorer and locate the test behavior script that you want to enhance. The test behavior script is a .java source file located in the Behavior folder of the test project.
  2. Right-click the test behavior script and click either Component Test > Add Scenario-based Test or Component Test > Add Method-level Test depending on the type of test that you want to add. This launches the Update Test wizard.
  3. Use the Update Test wizard to create the new test method. The wizard is similar to the New Java Component Test wizard for either scenario-based testing or method-level testing, except for the additional Script skeleton list that displays the structure of the existing test behavior for reference purposes.
Refer to the topics on creating new component tests for instructions on using the wizard for the type of component test that you want to add. The Update Test wizard automatically reuses any relevant information from the existing test suite.
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.