2 Minutes To Code (β Version)

JMeter - 2 minute tutorial

Example of Constant Timer (sample usage)

A constant Timer will introduce a fixed delay between consecutive requests of the same thread. Let's seen an example of Constant Timer in use.

The thread group used has a loop count of 2 and 3 HTTP samplers are used. We will add a Constant Timer to our Test Plan (Image 1). This timer will be set to use a Thread Delay of 2000 ms ( Image 2).

Now, Image 3 shows the output when Constant Timer was not used. See the Start Time and Sample Time (ms) which shows how the thread hit the next http url as soon as one was finished, i.e. incessantly.

Image 4 shows the output when a Constant Timer with 2000ms of Thread Delay was used. Notice the Start Time and Sample Time fields in the results pane, which shows that the start time of next http request is equal to the start time of previous request, plus the sample time (ms) , plus the thread delay of 2000 ms.

In actual load testing, the thread delay you will use with be much less.

Image 1: Adding Constant Timer

Image 2: Configuring Thread Delay of 2000 milliseconds

Image 3: Result without using Constant Timer

Image 4: Result with Constant Timer