This topic explains how to make test suites reusable. For a step-by-step demonstration of how to construct and use a reusable test suite, see Creating Reusable (Modular) Test Suites.

Sections include:

Introduction to Reuse/Modularization

In many cases, you may want to create a test suite that can be reused by other test suites. A common example is a test suite that logs in to a web site. Once such a test suite is created, it can be used by other test suites in various scenarios that require a login.

The following features are especially helpful for implementing reusable test suites:

  • Referenced test suites: Once a reusable module or test suite has been created, it can be referenced by another test suite.
  • Variables: You can parameterize tests with variables, which can be set to specific values from a central location, set from data sources, or set from a Data Exchange or Extensions tool.

Using Test Suite References

Adding an existing test suite as a test suite reference is especially useful if you have a test suite that you would like your team members to reuse across multiple parent test suites.

For example, you may have a single Authentication test suite that different team members want to use within different root test suites. In this situation, the team members can add a reference to the defined Authentication test within their specific test suite.

For another example, consider a web application that requires a user to log in. The sequence of steps to log into the application could be saved in one SOAtest test suite, then every functional test for that web application could reference the test suite containing the login information. Setting up the tests in this manner makes it much easier to manage an evolving web application. If an extra step is added to the log in process for the web application, then only the "log in" test suite needs to be modified to include that extra step, and all other tests that reference the "log in" test suite will automatically be updated with the change.

To reference an existing test suite in another test suite:

  1. Right-click the Test Suite tree node where you want the test suite referenced and choose Add New > Test Suite.
  2. Select Reference Test (.tst) File and click Finish.
  3. Select the appropriate .tst file from the file chooser that opens. After you add a test suite reference, it will be referenced by the current test suite. 

If a referenced test suite is modified, for example, it is moved from its original location in the Test Case Explorer, changes will be propagated to the parent by closing and opening the test or restarting SOAtest.

Using Variables

For details on using variables, see Defining Variables.


  • No labels