Repeating tests in a schedule
By adding a loop to a A schedule, in this context, is used to refer to both VU Schedule and Rate Schedule., you can repeat a test for a number of iterations and set the rate for running a test. If the loop contains a synchronization point, the synchronization point is released after the first iteration of the loop and stays released for all further iterations.
About this task
A schedule that contains only user groups and tests runs each test in a user group sequentially. Loops provide more sophisticated control than running a simple sequence of consecutive tests.
Loop location | Results |
---|---|
Schedule | Loops in schedules are easy to locate and modify. Loops in schedules close the server connection at the end of each iteration and reopen it at the beginning of the next iteration. This action models the behavior of a user closing and reopening a browser. Use this method to run a test at a set rate. For more information, see Running tests at a set rate. |
Test | Loops in tests can be more granular, and thus
provide a higher level of control. Loops in tests reuse the server connection during each loop iteration. Use this method, with loops that have high iteration counts, to stress test a server. |
Procedure
To add a loop to a schedule:
-
In the Test Navigator, browse to the schedule and double-click
it.
The schedule opens.
- Click the item that you want to be the parent of the loop, and then click .
-
In the Schedule Element 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 at least for 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 schedule duration ends. Use this option to gather performance data over time: set an infinite loop, and then set the schedule to stop after a specific time. -
To maintain a set transaction rate for all schedule items
that are children of this loop: