0% found this document useful (0 votes)
4 views

How-to-Perform-JMeter-Load-Testing

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

How-to-Perform-JMeter-Load-Testing

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

How to Perform JMeter Load Testing?

1. Adding a Thread Group


• Open the JMeter window.
• The window is divided into two parts. The left side has all the added elements, while the
right side has all the configurations of that element.
• Rename the test plan and save it.
• Let's rename it as the FirstJMeter.
• Right-click on the test plan.
• Go to add -> Threads (Users) -> Thread Group

Now once you click on Thread Group, there are three things on the screen that are important
concerning the load test:
• The number of threads (users): It reflects the number of threads or users JMeter will
simulate.
Let's make it 100.
• Ramp-Up Period (in seconds): The duration of time that JMeter will take before starting
the thread over.
Let’s keep this to be 12.
• Loop Count: It is the number of times the test will be executed.
And this one, let's leave it to be 1.
The next step is to add an HTTP Request Defaults
2. Add an HTTP Request Defaults
This is done so that multiple HTTP requests can be sent to the same server.
• Right-click on the Thread Group.
• Go to Add -> Config Element -> HTTP Request Defaults.
In the window that appears, fill the Server Name or IP with the name of the server you want to
test. Here, we have used Simplilearn’s website.
• The next step is to add an HTTP Cookie Manager.

3. Add an HTTP Cookie Manager


Here we shall support cookies by adding HTTP Cookie Manager to the Thread Group:
• Right-click on the Thread Group.
• Go to Add -> Config Element -> HTTP Cookie Manager
4. Add an HTTP Request Sampler
• Right-click on the Thread Group.
• Go to Add -> Sampler -> HTTP Request
Under the HTTP Request section, HTTP Request gives the path that each thread or user will
request. We will set it to be "/" so that each thread can access the homepage of our server.

Any number of HTTP requests can be added. Further, all you need to do is repeat the above
step.
5. Add a View Results in Table Listener
Listeners are something that is used to provide the outputs of a load test. There are different
types of listeners present in JMeter, and a good deal may be added using plugins.
The listener we will use here is the Table, as it is comparatively easy to read.
• Right-click on the Thread Group.
• Go to Add -> Listener -> View Results in Table
A value for Filename may be typed to output the results to a CSV file.
6. Run the Basic Test Plan
• Save the test plan.
• Click on View Results in Table.
• Click on the Run button (green start button).
You will see the test results in the Table, as shown below:

The result shows the status of all the requests as “Success”. Then there are two important
columns, Sample Time (ms) and Latency.
Latency refers to the number of milliseconds between the time JMeter sent the request and
when an initial response was received.
Sample time refers to the milliseconds taken by the server to complete the request.
You can try the same demo by fluctuating the values of the number of threads or the loop. When
you fluctuate these values, the sample time value or other output values will begin fluctuating,
telling you if the system is overburdened or just fine.

You might also like