Back to FAQs

How do I make a test stop after X iterations?

Normally, Loadster’s bots will run your script repeatedly for as long as there is time remaining in your load test.

However, there are times when you might want to run a certain number of iterations and then stop. For example, maybe you are testing a shipping application, and just want to process 10,000 shipments in as little time as possible. Once that number of iterations has been reached, the bots should exit, even if there is time remaining in the test.

To set an iteration limit, open your test scenario and click the wrench for the bot group(s).

Getting to the advanced bot group settings
Getting to the advanced bot group settings

Click to expand the iteration limit. While it’s unlimited by default, adding a limit here will make your bots stop once the limit has been reached.

Limiting the number of iterations
Limiting the number of iterations

Keep in mind, if the test is too short, your bots may still exit before the number of iterations has been reached. They exit after the iteration limit has been reached or the time runs out, whichever happens first.

Read more about this and other advanced configuration options in Running Load Tests.