In earlier article, We learn some basic things about Synchronizing Timer. As you know, Synchronizing Timer is useful to release given number of threads at once to generate load on selected request or all requests of your software load test plan. In this article, We will learn how to use synchronizing timer on controller level of your software load test plan and how it works.
Using Synchronizing Timer On Controller Level
I have prepared test plan with 2 Thread groups. Thread Group - 1 has Synchronizing Timer on controller level and Thread Group - 2 don't have any Synchronizing Timer as shown in bellow image.
Both Thread Groups has same configuration as described bellow.
- Number of Threads = 4
- Ramp-up Period = 1
- Loop Count = 1
- Number of Simultaneous Users to Group by = 4
- Timeout in milliseconds = 0.
In Thread Group - 1 of software load test plan, We have set Synchronizing Timer under simple controller so Synchronizing Timer will force every requests of simple controller to wait for 4 threads. Once 4 thread reached on specific request, It will release all threads at once. That means 4 threads will execute same request at same time and generate load on that specific request. Same thing will apply to all requests which are under simple controller of Thread Group - 1.
Thread Group - 2 is used to compare the results of test plan execution with Synchronizing Timer and without Synchronizing Timer as Thread Group - 2 do not have any Synchronizing Timer.
Also added "View Results in Table" listener under both Thread groups.
When run above software load test plan, "View Results in Table" listener of Thread Group - 1 will show result like bellow. Observe "Start Time" of all 4 requests in bellow given image.
You can see that start time of each group of request is nearest same in milliseconds. You will find hardly 0.01 millisecond difference between 4 thread's start time of specific request. That means, All 4 thread has executed all 4 requests concurrently.
Now if you will see Start time of Thread Group - 2, It is different for each group of request as shown in bellow image.
Start time is different for group of requests and also execution sequence is different.
This way, You can use Synchronizing Timer on controller level in your software load test plan to generate load on all requests of test using concurrent users.
No comments:
Post a Comment