JMeter Listeners: Analyzing Results With Different Listeners

This tutorial explains the different JMeter Listeners types to view JMeter Test Results and how to use them to analyze the results:

Results of the tests executed in JMeter can be viewed using Listeners. So, the test plan should have listeners added to check the results of the execution.

JMeter listeners allow viewing the results in various formats like Table, Trees, Graphs, Logs, etc.

Listeners are the most important part of JMeter’s test plan as users can only see the results of their samplers by making use of listeners. All listeners have different importance and they can be selected based on how you want to see your results.

=> Click here for The Complete Free Training On JMeter (20+ Videos)

Jmeter Listeners

JMeter Listeners Types

The various formats in which JMeter Listeners views the result are enlisted in the below image.

Jmeter Listeners result format

Different Type of Listeners available in JMeter are:

  • View Results Tree
  • Summary Report
  • Aggregate Report
  • Backend Listener
  • Aggregate Graph
  • Assertion Results
  • Comparison Assertion Visualizer
  • Generate Summary Results
  • Graph Results
  • JSR223 Listener
  • Mailer Visualizer
  • Response Time Graph
  • Saves Responses to a file
  • Simple Data Writer
  • View Results in Table
  • Bean Shell Listener

Video Tutorial On JMeter Listeners

Table Results shows the result in table format with latency, response time, connect time as important parameters. The response can be seen in the text, HTML, JSON, XML by viewing the results in Tree Format.

Aggregate graph and the Aggregate report is handy in case of a large number of samples, and you need to send graphs to your client. 90% line, 95% line, average, median values can be fetched by using Aggregate Report listeners.

How To Add Listeners

To add Listeners, follow the steps mentioned below:

  • Open JMeter
  • Right-click on the test plan.
  • Click on Add.
  • Select Listener. It will list all the listeners which can be added.

Jmeter Listeners

Let’s go through commonly used Listeners:

#1) Aggregated Graphs

Aggregate Graph is one of the important listeners in JMeter. All the necessary information is provided by this listener.

Components:

  • Name: Listener Name
  • Comments: If any can be provided.

Data provided by Listener:

  • #Samples: Total number of Samples.
  • Average: Average Time.
  • Min: This is the minimum time a sampler has taken to go to the server.
  • Max: This is the maximum time request taken to go to the server.
  • Error%: Number of error sampler/Total number of Sampler.
  • Throughput: Throughput is the per second sample received by the server.
  • Received KB/second: This defines how many kilobytes per second received by the Client.
  • Sent KB/second: This defines how many Kilobytes per second are sent to the server.
  • 90% Line: It represents that 10% of the samplers have exceeded time to reach the server.
  • 95% Line: It represents that 5% of the samplers have exceeded time to reach the server.
  • 99% Line: It represents that 1% of the samplers have exceeded time to reach the server.

The above information is very much required and important for a user who is performing a load test as this data analysis helps the user to work on improving the performance of the web application in the test.

Data provided by Listener

The data, as we discussed above, can be represented in graphical form as well through this listener, using the Display Graph option. It makes it easy to analyze the data and to work on it as Graphical representation is easy to understand and analyze.

Aggreagate display graph

#2) Aggregate Report

Aggregate Report Listener is the same as Aggregate Graph listener. Both the listeners provide the same data for the analysis of the user.

The only difference in both the listeners is that the Aggregated Graph can be viewed in both statistical and graphical form whereas Aggregate Report data can be viewed in statistical form only.

Aggregate Report

#3) Assertion Results

Assertion Results Listener is used to check whether the assertion applied is pass or fail. As it checks the assertion result, the listener should always be created once the assertion for the sampler and requests is created.

Assertion Results

#4) View Results In Table

As the name suggests, “View Results in table” listener shows the data in table form, i.e. in rows and columns. It is a commonly used listener and provides important information for analysis. It shows the data in table form for all the samplers. This listener cannot be used for complete load testing as it consumes a large amount of CPU/memory.

View Results in Table

Components:

  • Name: Listener Name
  • Comments: If any can be provided over here.

Listener shows the below data:

  • Sample #: Total number of Samplers.
  • Start Time: It is the time when samples were issued.
  • Thread Name: Name of the thread.
  • Label: Label as provided.
  • Sample Time (ms): Once the request is initiated by the server, the time taken to get the response of the request is the Sample time.
  • Status: Status as Pass/Fail symbol.
  • Bytes: Received bytes by the client.
  • Sent Bytes: Bytes sent to the server.
  • Latency: It is the delay in response by the application for the request sent by the user.
  • Connect Time (ms): This is the time that a request takes to hit the server.

#5) View Results In Tree

This Listener has a benefit that it can check both request and response as it compares the requirement and actual result. It does not show the pass assertion results.

View Results in Tree

The response can be viewed in different formats that can be selected from the drop-down on the left as shown in the below screenshot.

The different available formats are: Text, Regexp tester, Boundary Extractor Tester, CSS/JQuery Tester, Xpath Tester, JSON Path tester, HTML, HTML Source Formatted, HTML (download resources), Document, JSON, XML, Browser.

View Result Tree_text dropdown

This listener is also good for basic testing only and not for load testing as it consumes a large number of sources as CPU and memory.

#6) JMeter Summary Report

The summary report provides the informational data required for analysis.

Summary Report

The below data is provided by the listener:

  • Label: Label is the name or URL for the request.
  • #Samples: No. of samples is the number of users per request
  • Average: Average time is calculated based on the time taken by samples to run the label.
  • Min: Minimum or least time taken by a sample for the label.
  • Max: Maximum or longest time taken by a sample for the label.
  • Std Dev: It is a deviation from the average value of sample response time.
  • Error%: Percentage of failed requests.
  • Throughput: It is the number of requests processed by the server.
  • KB/Sec: It is the downloaded data in KB/sec while performance execution is done.

#7) Generate Summary Results

Generate Summary Results Listener generates a Summary report in log form i.e. a log file is created and its format is specified in the JMeter properties file.

Generate Summary Results

#8) Graph Results

Graph Results listener is used by the user if they require results in graph form. The graph represents the data of the latest sampler and the response time in the x and y-axis, respectively.

Graph Result

#9) Save Responses To A File

Save responses to a file Listener save the responses of the request. As shown in the below screenshot, the response can be saved using various options. Like we have failed and pass responses, selecting the field will provide the required data only.

There can be several reasons to save the responses as at times we cannot find the failure reasons at the time of execution so saving the data helps us to analyze the data later on for knowing the reason for the failure.

Save Response to a file

#10) Simple Data Writer

Simple Data Writer listener logs the response and writes them in a flat-file.

Simple Data Writer

FAQs About JMeter Listeners

Q #1) Which of the listeners comes with JMeter?

Answer: These are listed below:

  • View Results Tree
  • Summary Report
  • Aggregate Report
  • Backend Listener
  • Aggregate Graph
  • Assertion Results
  • Comparison Assertion Visualizer
  • Generate Summary Results
  • Graph Results
  • JSR223 Listener
  • Mailer Visualizer
  • Response Time Graph
  • Saves Responses to a file
  • Simple Data Writer
  • View Results in Table
  • Bean Shell Listener

IMPORTANT – There are some additional listeners that don’t come as part of the Jmeter default package. Download the plugins and paste them in the EXT folder of the Jmeter directory in order to see them.

Q #2) What is the View Result tree in JMeter?

Answer: View Result tree provides the Sampler result which can be viewed in different formats along with the request and response parameter. This listener shows only the failed assertion of data and not pass one.

Q #3) How do you analyze graph results in JMeter?

Answer: Graph Results shows the following data:

  • No. of Samples: Total number of Samples executed while the load test.
  • Latest Sample: This shows the latest Response time.
  • Average: This shows the average total response time of the samples.
  • Throughput: Number of requests sent to the server during Test/Time (seconds/Minutes/Hours)
  • Deviation: If the deviation value is low, it means the system is not under stress. Deviation basically shows the variation in response time.

Q #4) Which of the listeners should be disabled during a load test to conserve the resource consumption?

Answer: All the listeners should be disabled during a load test as they consume many resources which can be utilized for other elements. The results should be saved and used for later analysis.

Before starting a load test, all the listeners should be disabled.

Q #5) Does JMeter require coding?

Answer: No, it does not require coding skills. If any script has to be created, that can be done using an inbuilt recorder.

Conclusion

All the listeners are very important and help to get responses from the samplers and provide data to analyze which can be very useful for performance testing.

Listeners such as View Results Tree, View Results in Table, Assertion Results are the ones that should not be used while performing load testing as they consume lots of resources that can rather be used for other elements.

Aggregate Graph and Graph Listeners show data in the graph which makes it more understandable and easier to analyze the data.

Summary Reports can be analyzed using the Summary Report and Generate Summary Results. To save the responses and to use later for analyses Save Responses to a file can be used.

=> Click here for The Complete Free Training On JMeter (20+ Videos)