Run test elements in random order

 

+

Search Tips   |   Advanced Search

 

Overview

To run test elements in random order...

For example, you can record a test that includes...

In this case, you could run the logging in and the totaling scenarios once, but put the browsing and buying scenarios under a random selector.


Put a test element under the control of a random selector

  1. Double-click a test

  2. Select a test element and then click...

      Insert | Random Selector

    Use Shift+Click to select multiple elements.

  3. When asked whether to move the selected elements into a new random selector, click Yes.

    Click No to insert an empty random selector into the test.

    To set whether or not elements are moved automatically, or whether you are prompted, click...

      Window | Preferences | Test | Test Editor | General tab

  4. Set the weight of the random selector.

    The weight determines the statistical probability that a specific element will be selected.

    1. If you have added a number of test elements, a window is displayed...

        Create weighted blocks

      You can select adjacent elements and group them. Each element, whether in a group or by itself, must be weighted.

    2. If you have added only one test element, the weighted block is displayed in the Test Element Details area with a default of 1.


Example

To determine the likelihood that a block will be executed, add the weights together and divide the weight for each block by that total.

For example, with...

The total of the weights is: 1 + 1 + 2 + 5 + 5 + 9 = 23. Therefore, the statistical likelihood of selection is:

Note that a higher weight increases the likelihood, but does not guarantee, that a block will be executed. Some variation might occur.

For example, if you run a test 23 times, you cannot predict that the first and second blocks will execute exactly once, the third block exactly twice, the fourth and fifth blocks exactly five times, and the sixth block exactly nine times. However, the more times that the blocks are executed, the more accurate this prediction is.


Related

  1. About test variables
  2. Add test elements
  3. Editing Kerberos tests
  4. Search within tests
  5. Disabling portions of a test or schedule
  6. Rename test assets
  7. Delete test assets
  8. Provide tests with variable data (datapools)
  9. Viewing binary data
  10. Correlating response and request data