Skip to end of metadata
Go to start of metadata

Sometimes in tests executing multiple iterations, it is desirable to request a page only once, in the beginning or at the end, to perform initial or final actions. For instance, in a test case, a user logs in, performs some actions, and logs out. During the test run, you want every VU to login only on the first iteration and logout only on the last iteration, while other pages should be repeated multiple times.

Use the When to Request the Page property to configure such tests. Set this property to On 1-st Iteration on the login page and to On Last iteration on the logout page.


The table below shows how to use this property.

When to Request the Page


In All iterations(Default) The page and all its requests will be sent in all VU's iterations.
In 1-st iterationThe page and all its requests will be sent only in the first iteration. This is used for a log-in type page.
In Last iterationThe page and all its requests will be sent only in the last iteration. This is used for a log-out type page.


  • Actions executed on the 1st iteration, create certain state that must be carried over throughout the entire test. For example, the log-in process on the 1st iteration generates a session ID that should persist throughout the test. To satisfy this requirement, enable Cache Control and set the VU restarting browsers % to 0. For more information see Test Case: Caching Rules and Test Case: Session Persistence.

  • If you are running the log-out process on the last iteration only (as in the example above) your test must set Test Completion Criteria to Number of iterations.
  • No labels