Constant timers in jmeter

Add a new thread group.Add a number of java reqs and rename them 1,2,3,4.

Add a constant timer to the thread.Since this timer is added to thread it is at the same level as all java reqs so it will apply delay to all the threads.

We can add a Results tree and then run the test and see the result tree and see all reqs are paused a certain amount of time before the req is run.

If we want to put just before a particular step we can constant child of any req.so whichever req has a constant timer as child that req will take time to execute.

Now if we add multiple timers as child of a thread so that hey apply to all the reqs then each of the reqs have to wait for the sum of all timers i.e if there are two timers one has delay of 10 secs the other has delay of 20 secs then both threads have to wait 30 secs.

We can even add a Simple controller and add a constant timer as its child.But this constant timer delay will only appply to to res that are child of Simple Controller and not to other reqs in the thread group that are not child of Sample controller.

Then in each of the req name we can add

${__time(YMDHS)}
after the name of the req.It will give the time at which the req will be executed.In this way we can find out whether the constant timer delay is actually applied to the threads.

Random function --${__Random(2000,5000,refVar)}

That above func will take constant timer value between 2 secs to 5 secs and put the value in variable we named refVar.

We make a constant timer and instead of adding delay manually like 2 secs,4 secs etc we can give this random variable over there.

Then in name of each request after

 ${__time(YMDHS)}
we can add ${refVar} to see what random time our constant timer selected and from result tree from ${__time(YMDHS)} find ou whether each req is actually delay for that random amount of time.