Performance testing is crucial to determine that the web application under test will satisfy high load requirements. It can be used to analyze overall server performance under heavy load.
|
- JMeter can be used to test performance of both static resources such as JavaScript and HTML, as well as dynamic resources, such as JSP, Servlets, and AJAX.
- JMeter can discover maximum number of concurrent users that your website can handle
- JMeter provides a variety of graphical analyses of performance reports.
- 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 produce errors. The purpose of the stress testing is to find the maximum load the web server can handle.
Create a Performance Test Plan in Jmeter
In this tutorial, we are doing a performance analysis of Google.com for 1000 usersBefore testing the performance of target web application, we should determine-
- Normal Load: Average number of users visit your website
- Heavy Load: The maximum number of users visit your website
- What is your target in this test?
Step 1) Add Thread Group
- Start JMeter
- Select Test Plan on the tree
- 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
Now we determine what JMeter elements in this test. The elements areHTTP request Default
HTTP Request

In this test, you keep the Path field blank to make JMeter create the URL request http://www.google.com to Google 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 time.The picture below presents a graph of a test plan, where we simulated 100 users who accessed on website www.google.com.
- 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
- Throughput
- Deviation
In this test, the throughput of Google server is 1,491.193/minute. It means Google server can handle 1,491.193 requests per minute. This value is quiet high so we can conclude that Google server has good performance
The deviation is shown in red - it indicates the deviation from the average. The smaller the better.
Let compare the performance of Google server to other web server. This is the performance test result of website http://www.toiansach.com/ (You can choose other website)
The deviation is 2689, much higher than Google (577). So we can determine the performance of this website is less than Google server.
NOTE: The above values depend on several factors like current server load at google , your internet speed, your CPU power etc. Hence, it's very unlikely that you will get the same results as above. So don't panic!
Troubleshooting:
If you face the issue while running the above scenario ... do the following- Check whether you are connecting to internet via a proxy. If yes, remove the proxy.
- Open a new instance of Jmeter
- Open the PerformanceTestPlan.jmx in Jmeter
- Double Click on Thread Group -> Graph Result
- Run the Test







Damn good !
ReplyDelete