3. Building a Test plan
A test plan describes a series of steps JMeter will execute when run. A complete test plan
will consists of one or more Thread Groups, logic controllers, sample generating controllers,
listeners, timers, assertions, and configuration elements.
Confidential
4. The first step you want to do with every JMeter Test Plan is to add a
Thread Group element.
The Thread Group tells JMeter the number of users you want to simulate, how often the users
should send requests, and the how many requests they should send.
Add the ThreadGroup element by first selecting the Test Plan, clicking your right mouse button
to get the Add menu, and then select Add --> ThreadGroup.
Confidential
5. Need to modify the default properties.
Select the Thread Group element in the tree. Should be able to see the Thread Group
Control Panel in the right section of the JMeter window.
Thread group elements are the beginning points of any test plan. All elements of a test plan
must be under a thread group. As the name implies, the thread group element controls the
number of threads JMeter will use to execute your test. The controls for a thread group
allows:
◦ Set the number of threads
◦ Set the ramp-up period
◦ Set the number of times to execute the test
Confidential
7. Each thread will execute the test plan in its entirety and completely independently of other test
threads. Multiple threads are used to simulate concurrent connections to the server application.
In the name field, enter the number the Users. For example enter the value of 5
In the next field, the Ramp-Up Period, leave the the default value of 0 seconds. This property tells
JMeter how long to delay between starting each user. For example, if the value of the field Ramp-
Up Period is 5 seconds, JMeter will finish starting all of your users by the end of the 5 seconds. So,
if we have 5 users and a 5 second Ramp-Up Period, then the delay between starting users would
be 1 second (5 users / 5 seconds = 1 user per second). If the value is set to 0, then JMeter will
immediately start all of your users.
Finally, clear the checkbox labeled "Forever", and enter a value of 2 in the Loop Count field. This
property tells JMeter how many times to repeat the test. If the loop count value of 1, then JMeter
will run your test only once. To have JMeter repeatedly run the Test Plan, select the Forever
checkbox.
By default, the thread group is configured to loop once through its elements.
Confidential
9. Version 1.9 introduces a test run scheduler .
Click the checkbox at the bottom of the Thread Group panel to reveal extra fields in which the start and
end times of the run can be entered. When the test is started, JMeter will wait if necessary until the start-
time has been reached. At the end of each cycle, JMeter checks if the end-time has been reached, and if
so, the run is stopped, otherwise the test is allowed to continue until the iteration limit is reached.
Confidential
10. Confidential 10
To view results, add Listeners and then click Start from the Run menu. Before starting the
test, make sure that all the requests are under the Thread Group.
11. Test execution in JMeter is done inside a Thread Group.
Confidential 11
Scheduler can be used for configuring the test to start at a later point in time.
Action to be taken
when error occurs
Fields for entering users
Ramp up period and number
of iterations.
Scheduler
12. The Startup-Delay field overrides the Start Time.
Loop Count overrides the Duration.
Loop Controller overrides the Duration.
Loop Count overrides the Loop Controller.
Duration overrides the End Time.
Confidential