Synchronizing users

Inserting a synchronization point enables you to coordinate the activities of a number of virtual users by pausing and resuming activities. You can synchronize all virtual users at the beginning of a schedule and stagger the release times so that the users do not overload the system. Synchronization points are also useful in stress testing.

About this task

You can insert a synchronization point into a schedule or a test. The advantage of inserting a synchronization point into a schedule is that the synchronization point is more visible than in a test. Also, you can define release options and select a timeout for a synchronization point set in a schedule.

Synchronization points within loops are not reset. In other words, once a synchronization point has been released (in the first iteration of a loop) it stays released for all further iterations.


To insert a synchronization point into a schedule:

  1. In the Test Navigator, browse to the schedule and double-click it.
    The schedule opens.
  2. Right-click the element just below the place that you want to add the synchronization point, and then click Insert > Synchronization point.
  3. Enter a name for the synchronization point, or select the name of an existing synchronization point to modify its release type.
    The synchronization point opens in the schedule for you to set its attributes.
    synchronization point with release type and timeout attributes
  4. Set the release type; that is, whether you want the users to be released at the same time or at staggered times. Use the Together release type when you are preforming a stress test on the system. Use the Staggered release type when you want the users released in such a way that they will not overwhelm the system.
    Together Releases all users at once from a synchronization point. The default restart time is 0, which means that when the last user reaches the synchronization point, all users are released together immediately.

    To delay the users, enter a number in the Restart Time field. For example, if you set the restart time to 4 seconds, after all of the users reach the synchronization point (or the timeout occurs), they wait 4 seconds, and then they are all released.

    Staggered Releases the users one by one from a synchronization point.

    The amount of time that each user waits to be released is chosen at random and is uniformly distributed within the range that you set in the Minimum time and the Maximum time fields.

    For example, if the Minimum time is 1 second and the Maximum time is 4 seconds, after the users reach the synchronization point (or the timeout occurs), each user waits between 1 and 4 seconds after being released. All users are distributed randomly between 1 and 4 seconds.

  5. Set the timeout period. The timeout period begins when the first virtual user reaches the synchronization point. If all the users that are associated with the synchronization point do not reach it when the timeout period ends, any users at the synchronization point are released. A timeout of 0 means that there is no timeout.

    Setting a timeout is useful, because one user might encounter a problem that prevents him from reaching the synchronization point. You do not want to hold up all users because of a problem with one user.

    A user reaching a synchronization point after a timeout is not held. However, the user is delayed if the Minimum time and Maximum time are set.