Adding a loop

To run a test or part of a test repeatedly for a specified number of times or duration, add a loop to the test. You can add a loop to the Launch Application node or In Application node.

About this task

When you add a loop to specific steps in a test, those steps are split to create a new In Application node. For information about splitting a test, see Splitting test actions.

When you associate a datapool to a test and want the test to fetch data from all of the rows of a datapool, add a loop to the test and set the loop to run infinite. You can also set the loop to run for a specific duration or number of times. For information about associating a datapool to a test, see Associating datapool with a test.


To add a loop to the Launch App or In App nodes:

  1. In the Test editor, click the Launch Application or In Application node.
  2. Click Insert > Loop.
    Add a Loop

    In the confirmation dialog box, click Yes.

  3. In the Loop Details area, specify a name for the loop.
  4. In the Loop Details area, type the number of iterations for the loop to repeat.
    Option Description
    Count-based Runs for the number of iterations that you select.
    Time-based Runs for at least the time that you specify. The loop always finishes the iteration. For example, if you select a time of 1 second and a loop takes 10 seconds to run, the loop finishes one iteration, and then checks the time.
    Infinite Runs until the test stops.
  5. Optional: Select Control the rate of iterations, and type your preferences for the pacing rate. In specifying a number of iterations for a unit of time, you set a fixed period for the iterations to complete. If you select Randomly vary the delay between iterations, the total delay is randomly distributed. If you clear this check box, the same delay occurs between each iteration.
    Note: Statistically, the Randomly vary the delay between iterations option sets delay amounts at random from a negative exponential distribution with the same mean as the fixed delay value. The negative exponential distribution has a long "tail," which means that a very small number of delays will have very large values. Therefore, make sure that the application you are testing is not negatively affected by long periods of inactivity (such as a timeout that disconnects the user).