Sometimes when tests execute multiple iterations, it is desirable to request a transaction 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 log in only on the first iteration and log out only on the last iteration, while other transactions should be repeated multiple times.

Use the When to request the transaction or 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 transaction or page

Properties

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

The transaction and all its requests will be sent only in the last iteration. This is used for a log-out type transaction.

Timed test

If the test completion condition is set to Run duration, then After the completion condition is reached property must be set to Wait for iterations to complete. Otherwise, the transaction may not execute.

DisabledThe transaction is disabled, and all its requests will not be sent.
Every-x-iterationsThe transaction and all its requests will be issued on the first and every number of iterations after that, specified in the Number of iterations property.
Every-x-minutesThe transaction and all its requests will be issued on the first and at least every number of minutes after that, specified in the Number of minutes property.

  • No labels