Working with JMeter Listeners

About Listeners

Listeners are used for displaying test results in JMeter. Listeners allow system engineers to analyze the responses from the testing system and monetize the request sent from JMeter.

You can show the listener results in a table, tree, graph, or write into a file. These demonstrated effects consist of time details,capacity-related information, percentages, and distributions.

1. How to add a listener

Listeners can be placed by right-clicking on a thread group or a sample and clicking Add >> Listener >> the Listener you prefer to have. Plenty of listeners with different aspects have added to the Listeners menu. The required listener has selected the sample and the relevance of the data. These listeners collect data from their level or high level of its placement position.

blank
blank

I have created two thread groups in the above Test Plan. A “View Results Tree Listener” has been placed in three different positions in the Test Plan. “View Results Tree 1”  Listener has is added as a child element of the “FTP Request Post” sample. So it will only display the results of its parent sample.“View Results Tree 2”  listener has placed under the” Thread Group.” So it will present results of all samplers in “Thread Group.” “View Results Tree 3” listener will show the results of all samplers in both “Thread Group ” and “New Thread Group.” Following is how a listener shows results based on its position.

2. Basic listeners for viewing results

I have created an HTTP Request Sampler to demonstrate the listeners below. I have used the Apache JMeter User Manual page to test the listeners, and you can find it from this link. The image below shows the settings of the HTTP Request Sampler. Also, I have to change the Thread Group properties for ten users. Use the path mentioned above to add.

blank
blank

2.1) View Results in Table Listener

This listener displays the data in the form of a table. The ten users obtain the following results. These results are in order of the time samples that were issued. Below is a useful listener to estimate a system under test quickly. Let’s understand the outputs from this listener.

blank

“Sample” is the number of the sample of 10 samples that we have used. Then the start time and the Thread Name are displayed. 1-1 in that indicates the first iteration of example 1. “Label” shows the type of request we have used. “Sample Time” is the response time for each sample in milliseconds. “Status” is displayed based on the assertion we use. If the claim passes, it shows in green, and if it fails, it shows in red. “Sent Bytes” are the size of our sample. “Latency” means the time that takes to receive a response from the start time. “Connect time” is the time that seeks to connect to the server.

2.2) View Results Tree Listener

This listener displays the samples and the results related to them. It displays request parameters, response parameters, and response data of the samples. ”Sampler Result” section also shows the data discussed in the above listener. In addition to that, it displays “Error count,” Data type,” Response Message,” Content-Type” data.

blank

“Request” shows the Get request to the server for receiving the information.

blank

Response data shows the data received from the server. In this case, it is an HTML code of the web page.

blank

2.3) Graph Results Listener

This listener generates the results in the form of a graph. It can give the Average, Median, Deviation, and Throughput data of the samples in a graphical view.“ Loop Count” property of the Thread Group should be set to infinite to get a continuous graph. The following listener is highly memory-consuming. So if you are testing a massive load test, it is better to get your results into a file.

blank

2.4) Save Responses to a File Listener

You can see a field called Filename in all these listeners. So you can give a “.CSV” or. “XML” file to save these data from the listeners in the runtime to that file. Give the path of that file in the desired location to the “Filename” field and run it. I have given a file as “Logged Data” for View results tree Listener,” and it has saved all the response data as in the below. “CSV” file.this is a beneficial way to observe test results when you are testing large systems.

blank
blank

These are the most used listeners in JMeter, and you can try them to see their performance according to your test plans.

Tushar Sharma
Tushar Sharmahttps://www.automationdojos.com
Hi! This is Tushar, the author of 'Automation Dojos'. A passionate IT professional with a big appetite for learning, I enjoy technical content creation and curation. Hope you are having a good time! Don't forget to subscribe and stay in touch. Wishing you happy learning!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

JMETER TUTORIALS

Recent Posts

RELATED POSTS

How To Record Using BlazeMeter Plugin (JMeter)

Honestly speaking if you already have a mature or established process using 'native' JMeter from Apache, without any kind of wrappers utilities or third-party...

Performance Testing on Firewall-Protected Networks

HP Load Runner is the most popular tool from HP for performance, load and stress testing tasks. Using the LR, you can check different...

How To Do Database Testing with JMeter

Introduction In this 'How-To', You will be guided to perform a database load test using JMeter. We will be installing Apache JMeter to perform the...

Common Issues with HP Load Runner

HP Load Runner is a popular automated load and performance testing tool that emulates actual load to check the performance and behavior of a...

Â

CHECKOUT 'HOW-TOs'

How To Install Oh-My-Posh On Windows PowerShell

Oh-My-Posh is a powerful custom prompt engine for any shell that has the ability to adjust the prompt string...

MORE ON CODEX

MORE IN THIS CATEGORY

Finding Web Elements with Selenium

I'm going to explain in this tutorial about the usage of the findElement and findElements method of Selenium Webdriver on the Chrome web browser....

How To Use Mouse and Keyboard Events with Selenium

In this tutorial, we will discuss how to use mouse click events and keyboard events with Selenium WebDriver. The mouse click and keyboard events...

Java Tutorial #3 – Java Arrays

Table of Contents One Dimensional Array Declaring Array Allocting Memory to Array Accessing Array Elements Initializing Array Length of Array Multi Dimensional Array Creating 3...

How To Record Using BlazeMeter Plugin (JMeter)

Honestly speaking if you already have a mature or established process using 'native' JMeter from Apache, without any kind of wrappers utilities or third-party...

OTHER TUTORIALS

Common Issues with HP Load Runner

HP Load Runner is a popular automated load and performance testing tool that emulates actual load to check the...
- Advertisement -spot_img