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

Getting Started with Apache JMeter

1. Introduction As a developer, you may have tested the functionality of your code hundreds of times during development. This is known as functional testing....

How To Create FTP Test Plan in JMeter

About File Transfer Protocol File Transfer Protocol is a widely used standard network protocol for FIle sharing between a client and server in the same...

A Prologue For HP Load Runner

Performance testing is one of the important processes of the software QA segment. While the application is efficiently designed and tested for functionality, it...

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...

Â

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

Essentials of Typical QTP/UFT Framework

Table of Contents Essentials 1: Test Artefacts Repository Essentials 2: Error Handling and Recovery Essentials 3: Object Identification Method Essentials 4: Test Data Management Essentials 5: Result and...

Getting Started with Selenium WebDriver

Table of Contents 1. Selenium and Selenium Web Driver 2. Setting-Up the Environment 3. Test Script with Selenium Web Driver 3.1) Creating a project 3.2) Creating...

How To Do API Testing with JMeter

Introduction Application Programming Interface is a very popular term among developers. It is simply a request provider that responds to your request. In other words,...

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...

OTHER TUTORIALS

Remove Duplicates from List Using Stream

Java 8 has added the Stream API that helps to easily perform bulk operations on Collections. A new method...
- Advertisement -spot_img