I have explained that JMeter is 100 %
java-based tool which was originally designed to perform load testing
of website or web-based application.
Let’s
talk about JMeter GUI:
JMeter
looks like below:
Lets
discuss the major pointers in JMeter GUI:
Test Plan:
The Test
Plan is your JMeter script, and it designs the flow of your load test.
There are
various elements in test plan. I would introduce them one by one. Also I will
try cover them separately in different posts
Elements of Test Plan:
1. Thread Groups:
To start building the test script, we need to
add a Thread Group.
Thread
groups determine the user flow and simulate how users behave on the app. Each
thread represents a user.
Steps to add thread group:
Right
click - Add->Threads(Users)->Thread Group
How to configure Threads Group:
-
Name: as per your convenience
-
Number of threads - the number of users you are testing. Let’s
say 10.
-
Ramp-up time - how much time you want to allow the Thread
Group to go from 0 to 10 users. Let’s say 10 seconds
-
Loop count - How many times the test should be looped.
Let’s say 2 times
2. Samplers
Samplers
tell JMeter to send requests to a server and wait for a response. They are
processed in the order they appear in the tree. Controllers can be used to
modify the number of repetitions of a sampler.
or in
other word, Samplers in JMeter allows JMeter to send different types of
requests to a server. Samplers are the actual requests, JMeter sends to the web
server under test.
3. Logic Controller: Logic Controllers determine the order in which
user request is executed. i.e. Logic Controller let you handle the order of
processing Samplers/Requests in a Thread. It will decide “When & How” to
send a request to a web server.
4. Configuration Element: Config elements are
used to configure or modify the sampler requests made to the server. These
elements are added at the same or higher level of the samplers that we want to
configure.
5. Timers:
JMeter
sends requests without applying any delay between each sampler/request. Timers
are the solution to all these problems. Timer element can be added in a test
plan to apply wait between each sampler/request
6. Pre-Processor: As name suggest pre processer execute before
real request.
Pre-Processor
element in JMeter is defined to alter the settings of Samplers in their scope.
It will always execute before the actual sampler request. Also, if a
Pre-Processor is added to a test plan, then it will be executed after response
has arrived.
e.g. correlation can be done in JMeter using
regex sampler. Similarly, we add customized code using Preprocessor.
7. Post-Processor: A Post-Processor executes some action after a
Sampler Request has been made. it will be executed when a Sampler Request
finishes its execution and can be used for post condition response.
8. Assertion: Assertion is like verification point of running
test. It is used to validate response of
the request, that sent to the server.
Assertion is a process where you verify expected result with the actual result
of the request at run time.
9. Listener: It is one of important aspect
of JMeter because it provides us results of test in various format like raw
data, graph. Lister allows us to analyze our test results in JMeter.
In other
words, Listener allows us to view and analyze the Sampler request and response
in the form of tables, graphs, trees etc. We can also save results in a file
and read saved results later.
Listener
can be added anywhere in the test plan.
This post
only explain basic understandings of JMeter GUI components. I would posting independent post of each
element to explore more.
Happy Testing!!!
Comments
Post a Comment