Search code examples
randomtimejmeterhttp-request

How to add different time delays between page requests in JMeter?


I've a JMeter Script that does the following:

  1. User registers to the site filling out a form with personal information
  2. Reads through Terms, Condition and agrees to the Agreement
  3. Reads through the instructions and answers practice questions before taking the test (next step)
  4. Takes a timed test of multiple choices for 10 minutes and submits answers.

As you can imagine, they require different delays. Users take 1-2 minutes to fill-out the form. Usually goes really quick through the terms and conditions (less than 30 seconds) and hits 'I Agree' button. Then spends 4-5 minutes in reading the instructions and taking the practice tests (I measured, takes approximately 4-5 minutes) and finally takes the 10 minute timed test.

Now, question is: how do I insert these different time delays between different page requests? I saw some posts that shows how to insert variable time delays to 'ALL' pages. But for me that doesn't help. Please see attached image of what I ideally intend to do.

Highlighted are my intended time delays. Can anyone please help? Thanks in advance! --Ishti


Solution

  • I think I got the answer. It's actually in the Manual itself at: http://jmeter.apache.org/usermanual/component_reference.html#timers

    Note that timers are processed before each sampler in the scope in which they are found; if there are several timers in the same scope, all the timers will be processed before each sampler. Timers are only processed in conjunction with a sampler. A timer which is not in the same scope as a sampler will not be processed at all. To apply a timer to a single sampler, add the timer as a child element of the sampler. The timer will be applied before the sampler is executed. To apply a timer after a sampler, either add it to the next sampler, or add it as the child of a Test Action Sampler.