Let’s discuss the Thread Group in JMeter Test Plan, I will be explaining the various components
of thread group:
·
Component of Thread Group:
-
Thread Properties
-
Scheduler Configuration
How to
Create a Thread Group Element in JMeter Test Plan?
In the previous chapter we learnt that how to
create a test plan. Thread Group is a element of test plan.
Please
note that to create a Thread Group, it is required to have the Test Plan
created.
Steps to
Create Thread Group:
1. Open the thread group panel by Right Click on Test Plan and
2. Click on Add
>> Threads >> Thread Group.
As shown
in the image below:
Components
of Thread Group:
The Thread Group Panel holds the following
components –
1) Action
to be taken after a Sampler Error: If
JMeter catch any sampler error during test execution, you can tell it how to
react in that scenario from the following available options
-
Continue: To
ignore error and move to the next element in the tree
-
Start Next Thread Loop: To stop current Thread and Start Next
-
Stop Thread: To
stop the current Thread execution.
-
Stop Test: To
stop entire test execution.
-
Stop Test Now: the
entire test will be stopped abruptly.
Note: Default
is Continue.
2) Thread
Properties
Number
of Threads (users): Simulates
the number of users or connections to your server application.
Ramp-Up
Period (in seconds): This field help us to
configure that how long to take ramp-up to the full number of threads chosen.
For Example:
If you
set “Number of Threads” to “40”, and “Ramp-Up Period to “80”
seconds,
then JMeter will wait till 80 seconds to make
all threads up and running. That means each thread will start 2 seconds late
after the previous thread was started.
Calculation
Method: Ramp-Up Period / Number of Threads i.e. 80 /40
= 2 (seconds)
Loop
Count: the number of times the test to be executed.
If you need to run the test forever, then
select the “Forever” check box.
Scheduler: To schedule test execution. Scheduler Configuration bottom
panel will get enabled when we select this checkbox.
The schedule feature is also very helpful in soak/endurance testing.
3) Scheduler
Configuration
This section helps us to configure test start
time, end time, duration and start up delay of load
test plan using Scheduler Configuration section.
To
enable this area of configuration, Scheduler check box must be selected from
the above Section of Thread Properties.
Scheduler configuration fields:
Start
Time: This plans the test to start at
scheduled time.
End Time: This field is to end the test at the mentioned
time. End time override and stop execution in between
Duration
(seconds): This tell the tool to execute the test
for the specific duration of time.
It also ignores or override the End Time
and All threads has completed its test or not.
Startup
delay (seconds): Configure to wait for
specified time before starting the test.
If the Startup time is set to 20 secs, JMeter
will not start loading the Users till the time210 secs are over.
Please
note that Pre-condition is that the JMeter should be running on given date and
time in “Start Time” field.
Happy Testing!!!!
Comments
Post a Comment