To do the load testing or performance testing of the web application by JMeter we need the following
1) Test plan — Contain the test cases or scenarios
2) Thread group —Representing the users
3) HTTP request sampler —Perform actual task
4) View tree listener —Display data
5) Summary report listener – Display data
6) Controllers — Used for grouping and applying logic to test group or items
When application which is under test needs conditional load testing and advance user transactions then we can use controllers of JMeter
The summary report shows values about the measurement JMeter have done while calling the same page as if many users is calling the page.
Samples: A sample means one HTTP sampler call. So the value of 51 means total 51 web page requests to the page of the application were made by JMeter
Average: This value is the average time taken to receive the web pages. Suppose there were 51 values of receiving time which were added and divided by 51 and this value is arrived by JMeter. This value is a measure of performance of this web page. This means on an average 334 milliseconds time is required to receive this web page for our network conditions.
Min and Max: These are the minimum and maximum value of time required for receiving the web page.
Std. Dev: This shows how many exceptional cases were found which were deviating from the average value of the receiving time. The lesser this value more consistent the time pattern is assumed.
Error %: This value indicated the percentage of error. Suppose 51 calls were made and all are received successfully this means 0 error. If there are any calls not received properly they are counted as errors and the percentage of error occurrence against the actual calls made is displayed in this value.
To check the performance of the web page the average value of receiving the page is an important parameter to check.
Request and Response in JMeter:
The request is send to web server from the user browser and web server send the response back on the browser. The JMeter have the similar workflow as the browser does. In JMeter the user browser request are recorded in a JMeter HTTP request sampler for multiple uses.
In JMeter HTTP request sampler sends request in HTTP format and the server receives the HTTP request, creates HTML response to Browser. The HTTP request sampler receives HTTP response and records it for analysis. This is the one user calling one web page and receiving it.
When we add one request sampler in the test plan in JMeter, it stores one web page calling and receiving sequence. This is call as single user transaction. In this way we can add any number of transactions in JMeter and JMeter can create a simultaneous transaction. So JMeter simulates multiple users by making copies of the samplers and running them in a separate thread.
JMeter HTTP request sampler makes all the received data for further analysis. JMeter use the tree view listener for actually visualizing the received response. This listener is good to know what request was send, what were the response and the result of the transaction.
When JMeter simulates multiple users by making the same call multiple times that time more analytical data is available. The summary report listener can show us additional calculated data line Min time and Max time taken for the response. It also calculates the average time taken.
JMeter is a open source and is very powerful tool to do the web application load testing. The tool is very easy to learn and you can configure JMeter with little learning curve and start working on doing the following
2) Load testing
3) Stress testing