How can I add delay between thread groups in Jmeter?

asmundur picture asmundur · Jan 9, 2015 · Viewed 7.9k times · Source

There are 7 thread groups in our test plan:

Thread group 1
Thread group 2
Thread group 3
Thread group 4
Thread group 5
Thread group 6
Thread group 7

When thread group 1 finishes, I need to add a delay before thread group 2 starts. I have thought about adding Startup delay (seconds) in each thread group, or adding a beanshell which contains a Thread.sleep(60); for example. Which is the best approach?

Answer

Nachiket Kate picture Nachiket Kate · Jan 10, 2015

Default behavior of JMeter is executing thread groups in parallel. You can avoid that by checking checkbox "execute thread groups sequentially".

Adding startup delay in a thread group is a good way. You also can achieve it like,

enter image description here

This way is it is applicable to all threadgroups which are executed sequentially. It will add constant delay between execution. Instead of constant time you can add Uniform random timer also.