Load testing using JMeter

karthikeyan S

1 min read

Load testing is to perform both normal and peak condition. The major purpose of load testing will help us to find our application performance in the traffic time. It will simulate the real life user to the application, so it will be easy for us to know the application behavior of multiple users hitting simultaneously. For load testing we are using the tool name called JMeter.

Basically JMeter has eight type of methods here we gonna see the GET and POST method.

Steps need to be followed for GET method:

Step 1: . Initially we need to install JMeter to our system. For installation please click JMeter installation.

Step 2 :. Once installation is over JMeter window will get open as shown below.

capture image

Step 3 :. Right click on the Test Plan to Add the “Thread Group”. It is used for adding number of user’s, time period.


Step 4 : .After declaring the user’s and time period we need to add “HTTP Request” (Right click above the Thread Group -> Add -> Sampler -> HTTP Request). In this tab declare the url, path and method as shown in below image.


Step 5 : Now add the “listener”. There are different listeners present here we can choose “Results Tree” listener (Thread Group -> Add -> Listener -> View Results Tree). After adding listener to our thread we can run the test.

Workspace 1_009

Step 6 : You can view the response in response data tab and the request sent in each get call in Request tab.

Steps need to be followed for POST method:

For POST method we also need to use the GET method and authenticity token for ruby on rails based applications.

Step 1 : Add Thread Groups and HTTP Request tab as we mentioned in above steps, in HTTP Request tab declare as per GET function just change “Follow redirects” into “Redirect Automatically“.

Workspace 1_010

Step 2 : If applications has authenticity token then we need to add “Regular Expression Extractor” (HTTP Request -> Add -> Post Processors -> Regular Expression Extractor).


Step 3 : Fill the required column in Regular Expression Extractor

i) Reference Name: LOGIN_AUTH_TOKEN

ii) Regular Expression: <input\s+name=”authenticity_token”\s+type=”hidden”\s+value=” (.*?)”\s*\/>

iii) Template: $1$

iv) Match No: 1

v) Default value: (leave empty)

Step 4 : Now again add the HTTP Request in POST method and declare (required parameters in the Send parameters With the request table) i have used three parameters in the table like user name and password and authenticity_token.


Step 5 : Add “HTTP Cookie Manager” (Thread Group -> Add -> Config Element -> HTTP Cookie Manager).

Workspace 1_014

Step 6 : Finally add View Result Tree and run the test.

Workspace 1_015

JMeter is the best tool used for Performance and Load testing. As i mentioned earlier it has eight different methods handled by Jmeter. Will be soon catching you guys with different methods workings in JMeter. Thank you guys for spending your time in reading my blog.

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *