Reputation: 113
I want to wait all the threads till each thread finishes its task in a thread group and start new iteration with all threads once again at same time.
i.e. for every iteration I want to make sure all the threads completed in last iteration.
Please provide your input for my requirement.
Upvotes: 0
Views: 4402
Reputation: 6398
You can achieve it using Synchronizing Timer. Place it as a child of the last Sampler
in the script, so all threads will wait for other threads to reach the last step.
Set Number of Simultaneous Users to Group by
to 0
, Timer will wait for the number of threads
configured in current Thread Group
.
Warning: This will result in sudden load (Spike) to the server as all threads starts the last step at the same time.
From JMeter Docs:
Note that timers are processed before each sampler in the scope in which they are found; if there are several timers in the same scope, all the timers will be processed before each sampler. Timers are only processed in conjunction with a sampler. A timer which is not in the same scope as a sampler will not be processed at all.
To apply a timer to a single sampler, add the timer as a child element of the sampler. The timer will be applied before the sampler is executed. To apply a timer after a sampler, either add it to the next sampler, or add it as the child of a Test Action Sampler.
So, try to keep Synchronizing Timer as a child of Test Action sampler Or Add a Debug Sampler
and add Synchronizing Timer
to it as a child, to avoid the unwanted spike as mentioned in Warning.
References:
Upvotes: 2