Skip to content

Policies

Policies

Several options are available by clicking on the Advanced Configuration button:

Error handling

The error policy defines what to do when an error occurs (i.e. an assertion failed):

  • Continue: the error is ignored and the test goes on.
  • Start next VU Iteration: the current Virtual User iteration is stopped and a new one is started.
  • Stop VU: The current Virtual User execution is completely stopped.
  • Stop Test: The load generator where the error is encountered is stopped.
  • Stop Test Now: The load generator where the error is encountered is stopped without waiting for threads to end.

End

Iterations

The iterations field lets you limit the Virtual Users execution to a number of iterations.

You still need to set up a duration for the User Profile, so make sure that the execution of all iterations wil not take more time than the specified duration.

Think time

You can also override think times for all actions of the selected Virtual User in this tab:

Select Thinktime in the dropdown menu to activate the think times override.

Then you can switch between 3 different modes by clicking on the left buttons:

  • Constant: All think times have the same value.

Think Time Constant

  • Range: Think times vary between a lower bound and an upper bound.

Think Time Range

  • Text: All think times have the same value defined in milliseconds but the value can be passed through a variable like ${thinktime}:

Think Time Text

Throughput

Throughput is another option for think time. When selected the think times will be adapted on the fly to try to match the requested hit rate for each virtual user running.

Typically with 10 hits per second and 100 users, you can expect a total of 1000 hits per seconds, provided your application can answer fast enough (in less than 1/10th of a second in that example):

Think Time Hits

Activating this option will automatically disable pacing since it is another way to achieve a similar goal.

Warning

This option is incompatible with the follow redirects and Download resources options because both can generate an unpredictable amount of hits per request. You can deactivate Download resources from the Device tab.

Pacing

Iteration pacing is another way to achieve a controlled injection rate for your tests. The way it works is as a minimum delay for each iteration.

For example if the virtual user iteration is finished in less than 55 seconds, this pacing will wait until 55 to 60 seconds elapsed before running another iteration:

Pacing

This way instead of controlling hits for all requests, you control the number of iterations you will execute over a period of time.

Activating this option will automatically disable Throughput since it is another way to achieve a similar goal.

Note

A fixed value can be used by providing the same number in From and To. This option is incompatible with the follow redirects and Download resources options because it applies at the iteration level, whatever the number of requests executed.

Warning

Pacing occurs at the end of an iteration. For that reason, if the current iteration is stopped because of an error policy or any other similar mechanism, the pacing will not be applied.