JMeter - Using Synchronizing Timer on Request Level

Earlier we have already learnt about some basic things about synchronizing timer and how to use it on controller level on software load test plan in my previous post. Now here we will discuss and learn how to use synchronizing timer on request level in software load test plan and how it will works. Let's understand with example.

Using Synchronizing Timer On Request Level
I have test plan with 2 thread groups -> Thread Group - 1 and Thread Group - 2. Each have 4 different requests. In Thread Group - 1, I have added synchronizing timer under "My Orders" request as shown in bellow image. Thread Group - 2 don't have any synchronizing timer.

Both Thread Groups are configured with same configuration as described bellow.
  • Number of Threads = 4
  • Ramp-up Period = 1
  • Loop Count = 1
Synchronizing timer which is under "My Orders" request has bellow given configuration.
  • Number of Simultaneous Users to Group by = 4
  • Timeout in milliseconds = 0.
As you can see, We have added synchronizing timer under "My Orders" request of software web application so synchronizing timer will force to block threads until reach 4 thread reached on "My Orders" request of software web application. When 4 threads will reach on "My Orders" request, all 4 threads will be released immediately.

Thread Group - 2 is added to compare results.

Run above test plan and view result in table for Thread Group - 1. It will looks like bellow.

In result you can see that all the 4 requests of "My Orders" are executed on same time as we have added synchronizing timer under "My Orders" request. Other requests are executed as per their own time.

Also you will not find any time sync in result of Thread Group - 2.

This way, You can use Synchronizing Timer on request level in your software load test plan to generate load on specific request.

No comments:

Post a Comment