Apache JMeter is open source software, a 100% pure Java desktop application, designed to load test functional behavior and measure performance of web sites. It was originally designed for load testing web applications but has since expanded to other test functions.
Load Testing: Modeling the expected usage by simulating multiple user access the web services concurrently.
Stress Testing: Every web server has a maximum load capacity. When the load goes beyond the limit, the web server start responding slowly and produces errors. The purpose of the stress testing is to find the maximum load the web server can handle.
Hands on with J-Meter GUI
As soon as you launch J Meter, you will see 2 elements
Test Plan is where you add elements required for your J Meter Test.
Following figure shows an example of Test Plan
The WorkBench simply provides a place to store test elements temporarily.
Different steps for test plan creation.
Step 1) Add Thread Group
Number of Threads:100 (Number of users connects to target website: 100)
Loop Count: 10 (Number of time to execute testing)
Ramp-Up Period: 100
Step 2) Adding JMeter elements
This element can be added by right-clicking on the Thread Group and selecting: Add -> Config Element -> HTTP Request Defaults.
In the HTTP Request Defaults control panel, enter the Website name under test
Right-click on Thread Group and select: Add -> Sampler -> HTTP Request.
In HTTP Request Control Panel, the Path field indicates which URL request you want to send to Google server.
In HTTP Request Control Panel, the Path field indicates which URL
For example, if you enter "calendar" in Path field. JMeter will create the URL request
If you keep the Path field blank JMeter will create the URL request http://www.abc.com to server.
Step 3) Adding Graph result
JMeter can show the test result in Graph format.
Right click Test Plan, Add -> Listener -> Graph Results
Step 4) Run Test and get the test result
Press Run> button (Ctrl + R) on Toolbar to start the testing process. You will see the test result display on Graph at the real
Black: The total number of current samples sent.
Blue: The current average of all samples sent.
Red: The current standard deviation.
Green: Throughput rate that represents the number of requests per minute the server handled
To analyze the performance of the web server under test, you should focus on 2 parameters
The Throughput is the most important parameter. It represents the ability of the server to handle heavy load. The higher the Throughput is, the better is the server performance.
The deviation is shown in red - it indicates the deviation from the average. The smaller the better.
View Results in Table displays the test result in table format.
Right click Add -> Listener -> View Result in Table
View Results in Table displays as below figure
Run your test
Let compare the performance of Google server to other web server. This is the performance test result of website http://www.yahoo.com/ (You can choose other website)
The throughput of website under test http://www.yahoo.com is 867.326/minutes. It means this server handle 867.326 requests per minute, lower than Google.
The deviation is 2689, much higher than Google (577). So we can determine the performance of this website is less than Google server.