Home > front end >  Jmeter delay between two loop count in Loop Controller
Jmeter delay between two loop count in Loop Controller

Time:01-30

I am trying to achieve below use case for load testing via jmeter

1. Search Product
2. Add to cart
3. Do payment

1 user with uid = 1 will perform above mentioned 3 steps every 5min for 1 hour. total request per user per hour. = 12(5 * 12 = 60) * 3(rpm) = 36(request per hour)

total users(threads) = 1000. total request per hour = 1000 * 36 = 36000

lets consider 3 request as a single set

I am looking for below things

  1. after every 5min 1 set should be executed
  2. delay between two sets should be of 5 min

can anyone please help me in achieving above scenario?

I have tried with below jmeter tools

  1. thread group (thread = 1000, ramp up = 100 sec, loop count = 1)

  2. loop controller( above 3 request with loop count = 12)

  3. constant timer = 300000 millisecond

  4. thread group (thread = 1000, ramp up = 100 sec, loop count = 1)

  5. loop controller( above 3 request with loop count = 12)

  6. constant throughput timer = 5 rpm

  7. thread group (thread = 1000, ramp up = 100 sec, loop count = infinite, duration = 3600 sec)

  8. above 3 request inside thread group

  9. constant throughput timer = 5 rpm

Also I have tried with random order controller

I am unable to simulate above scenario. What I am getting is first request is getting executed 1000 times, then delay, then second request is getting executed 1000 times, then delay then 3rd request is getting executed 1000 times.

CodePudding user response:

Constant Timer adds a delay before each Sampler in its scope

If you want to introduce a delay between 2 iterations add Flow Control Action sampler and define the desired delay there

Additionally if you want all the users to finish the action - add a Synchronizing Timer and set the number of users to group by to be equal to the number of threads in the Thread Group.

More information on JMeter Timers concept: A Comprehensive Guide to Using JMeter Timers

  • Related