TFK
TFK

Reputation: 121

Run same Jmeter thread group after certain interval

I am trying to run the same thread group after a certain interval. Example - JMeter will run thread group A and execute all http requests inside it and let's say for example after 20 sec it will run thread group A again and this loop should carry on until I manually stop the script.

What I have designed right now is something like this-

Thread Group A
     While Controller (I gave some condition so that it is always true) 
       Http request 1
       Http request 2
       Constant timer (20sec)

but this only puts 20sec delay between each http call.

Upvotes: 0

Views: 1811

Answers (1)

Dmitri T
Dmitri T

Reputation: 168052

  1. Replace Constant Timer with the Test Action sampler, keep all defaults and set "Duration" to 20000 milliseconds
  2. Add Syncrhonizing Timer as a child of the Test Action sampler and set "Number of Simultaneous Users to Group by" to be equal to the number of threads in your Thread Group
  3. That's it, synchronizing timer will act as a "rendezvous" point so all your virtual users meet there and wait for 20 seconds together.

You might also be interested in How to Easily Implement Pacing in JMeter in order to be able to configure more complex delay scenarios

Upvotes: 2

Related Questions