+

Search Tips   |   Advanced Search


Split a socket test

After recording a test, you can split it into smaller tests. Splitting tests enables you to create modular building blocks of smaller tests and combine them to make bigger tests. The original test is unchanged. You can recombine these building blocks in a schedule, including loops and conditions.

When reusing split tests in a schedule, ensure that the general test structure is consistent including socket connection and close elements.

For example, ensure that all socket send and receive elements are preceded with a corresponding socket connection and followed by a socket close element. When the split tests are recombined in the schedule, place them in the correct order. To split a socket test:

  1. In the Test Navigator, browse to the test and double-click it.

  2. Right-click a socket send or receive element in the test, and select Split Test. The page that you click is the first page of the new test.

  3. In the New Test Names window, confirm the location of the split, optionally provide names and descriptions for the split tests, and click Next.

  4. In the Split Test window, examine the changes to be performed as a result of the split, and click Finish.


Example

For example, you could record a test containing the following actions:

You then split the test into four parts: Logon, Create, Edit, and Logoff. You create a schedule that runs virtual users selected from a datapool. Each virtual user runs the Logon test, performs various combinations of the Create and Edit tests, and finally runs the Logoff test.