How to perform get request load or performance test on application server using Jmeter.

 1. Start Jmeter
Click on Jmeter_Home/bin/ApacheJMeter.jar or jmeter.sh to open Jmeter window

2. Add 'Thread Group' under 'Test Plan'
Right-click on the Test Plan > Add > Threads (Users) > Thread Group

Number of Threads (users): The number of users that JMeter will attempt to simulate. Set the 'Number of Threads (users)' field to 50
Ramp-Up Period (in seconds):start the total number of threads. Set the 'Ramp-Up Period' field to 5
Loop Count: The number of times to execute the test. Set the 'Loop Count' field to 5

3. Add Sampler under 'Thread Group'
Right-click on the Thread Group > Add > Sampler > HTTP request

Path: Enter your desired get request which page do you want to perform load or performance test.
Set the Path field to 'http://localhost:8080/AppMetaDataServer/metaservice?operation=get&servicename=mobilemaps&servicekey=isthebest&code=Base_and_version_configured&version=1.0.1&platform=BB'
N.B: How many Sampler do you want to add?.
It is depend on how many get request do you want to perform load or performance test. For example you want to perform load or performance test for get request and you must have add 5 Sampler.

4. Add Listener under 'Thread Group'
Right-click on the Thread Group > Add > Listener > View Results Tree
Right-click on the Thread Group > Add > Listener > Summary Report

View Results Tree:
You can see how many request successfully serve, how many request fail to serve and it reason.
Summary Report:
    Sample - number of requests sent
    Avg - an Arithmetic mean for all responses (sum of all times / count)
    Minimal response time (ms)
    Maximum response time (ms)
    Error rate - percentage of failed tests
    Throughput - how many requests per second does your server handle. Larger is better.
    KB/Sec - self explanatory
    Avg. Bytes - average response size
   
5. Finally Save Test plan then Press 'Ctrl'+ 'R' to run Test plan

N.B: You can change all names like as 'Test Plan', 'Thread Group', 'Sampler' and 'Listener' name

No comments:

Post a Comment