user432024
user432024

Reputation: 4665

Is it possible to loop a test in JMeter?

So I have a thread group set to run for 30 seconds with simple HTTP sampler. Basically the test just sends a GET request to HTTP server for 30 seconds.

Is it possible to have the same test restart again once it has finished based on a predetermined amount of times. So say i want the test to rerun itself 5 times...

Upvotes: 1

Views: 2515

Answers (1)

vins
vins

Reputation: 15370

Option 1:

It is possible with Run Time Controller.

I assume you have set the 30 seconds duration in the Thread Group scheduler.

Change the test plan as given below.

  • Thread Group - loop count should be 5 (no of times should be repeated)
  • Add a Run time controller - seconds should be 30
  • Move all the samplers, other controllers (whatever you had under the Thread Group) under the Run time controller.

Now this setup will the run the test 5 times - for 30 seconds each time.


Option 2:

You can use a bat/sh file to rerun the same test again and again in a loop if you are running the test in Non-GUI mode.

Upvotes: 3

Related Questions