SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

JMeter - Constant Timer Usage Parallel To Request

Constant Timer is very useful element of JMeter software load test plan as it allows you to pause each thread for same amount of time when executes the requests. You can add constant timer under controller and parallel to software load test plan's requests if you wants to put pause on each request. Also you can add constant timer under request if you wants to put pause on that specific request. Let's see how to add and use constant timer parallel to requests in software load test plan with example.

Add Constant Timer Under Controller In Your Software Load Test Plan
To add constant timer under controller,
  • Right click on your controller -> Add -> Select Timer -> Constant Timer. See below given image.

It will add constant timer under controller.

Example : Using Constant Timer Parallel To Request
As described earlier, It will apply pause on all requests if you put constant timer parallel to request. I have prepared very simple jmeter software load test example to show you how to pause threads for specific amount of time on each request by adding constant timer.

In below given image, You can see that my software load test plan has 4 requests and added constant timer parallel to those requests. Thread group configuration is as below.


Now i wants to pause thread for 2 seconds on each request of my software load test plan. So what i have doe is added constant timer parallel to requests and set Thread delay = 2000 milliseconds as shown in below image.


So now it will pause thread thread for 2 seconds on each request. 

Now if you run above software load test plan then result will looks like bellow.


In result you can see that start time difference between each request is nearest 2 seconds + Sample time(ms). i.e. Start Time for My Account request = 2 + Start Time of Login request(09:23:53.405) + Sample time(ms)(0.941) = 09:23:56.346.

This way you can use constant time in your software load test plan to put constant pause between requests.

No comments:

Post a Comment