-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

JMeter Cookbook
By :

By default, when test scripts are recorded in JMeter, they contain no pauses between page requests. This is sometimes known as the think time in test scripts. In reality though, most users will frequently pause for a duration of time on every page before moving on to another page in the application. In JMeter, the ways to achieve these pauses are through timers. JMeter comes with a wealth of timers to achieve this purpose.
In this recipe, we will show you how to mimic realistic user behaviors using the JMeter timers.
ch1_add_timers.jmx
test script located in the scripts/ch1
directory.100
to 1000
.300
to 500
.With our configuration, each thread will pause for a duration of 0.5
to 1.5
seconds after each request before proceeding to the next request. This is because we applied the timer at the root level of the test plan. If we wanted to have pauses after each logical page rendering, we will add a timer at the transaction controller level. This option is mostly what you will go with as a single rendered web page often consists of multiple requests.
There are many more timers that come bundled with JMeter even through additional plugins that serve different purposes. There are timers that simulate constant delay, constant throughput, random delay, and so much more. Depending on your use case and what you are trying to simulate, you will choose one or several of these.
Change the font size
Change margin width
Change background colour