Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert delay between each requests in Jmeter

Tags:

jmeter

I wanted to execute a Test Plan as Below. Example : I wanted every http request should take delay of two minutes

  • http_request_1,
  • delay (2 minutes)
  • http_request_2

All request are in same thread group

like image 784
user3282573 Avatar asked Feb 25 '14 09:02

user3282573


People also ask

Which timer can be used to generate a time delay between each user request in JMeter?

Gaussian Random Timer element is used to delay each user request for a random period of time. It has a random deviation around the Constant Delay Offset based on Gaussian curve distribution. For Example: Deviation Value: 100 milliseconds.

How do I add a delay to a thread group?

To add a timer element, we need to right-click on the Thread Group element and select Add, Timer, Constant Timer. Here, we've added a Constant Timer with a Thread Delay of three seconds to our thread group. This timer adds a delay between each request.

What is constant delay offset in JMeter?

Constant Delay offset (in milliseconds): Constant delay offset number is the number which shows a constant delay to be added in random number generated.

Does JMeter wait for response?

JMeter waits for a HTTP response by default. If you're using the HTTP Sampler then you can view the response for each request using the View Results Listener. You can also set the timeout for requests in the sampler itself or by using the HTTP Defaults Control.


2 Answers

  1. Create a transaction controller in Thread group
  2. put all your http requests under this transaction controller
  3. add constant timer (with value as 2 min) to transaction controller (this way it will be applicable to all request within that transaction controller)
  4. run your jmeter script

or if only 2 request are there then add only 1 constant timer in between both the requests.

like image 164
Nachiket Kate Avatar answered Sep 20 '22 07:09

Nachiket Kate


The simplest way is to add a single 'Constant Timer' to your thread group at the same level as your HTTP requests.

Right click Thread Group > Add > Timer > Constant Timer.

Set the timer value to however many milliseconds you need (in your case 120000), and it inserts a delay between all requests in that thread group.

enter image description here

like image 31
Dale Anderson Avatar answered Sep 18 '22 07:09

Dale Anderson