Search code examples
jmeterjmeter-4.0jmeter-3.2jmeter-5.0

Syncronizing threads from different thread groups in JMeter


2nd iteration of all thread groups is to be started after the first iteration of the thread group with longest iteration time is complete. This behaviour is only to be there in 2nd iteration. Not in first, third, fourth or any subsequest iteration.

Need help in achieving this.


Solution

  • Consider using Inter-Thread Communication Plugin.

    Example scenario:

    1. After first iteration each thread group writes something into FIFO queue using __fifoPut() function
    2. Add If Controller and come up with a condition to start 2nd iteration only if the size of FIFO queue is equal to the number of your Thread Groups in the test plan

    Check out SynchronizationExample.jmx plan for a demo use case.

    You can install Inter-Thread Communication Plugin using JMeter Plugins Manager