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:
- 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.
- Right-click the test behavior script and click either or depending on the type of test
that you want to add. This launches the Update Test wizard.
- 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.