What is JMeter?
Apache JMeter is an open source, free software testing tool purely based on java that are most widely used for performance testing and load testing for web application and other services. Performance testing means, testing a web application or other services against heavy load, multiple and concurrent user traffic.
In other words, one should use JMeter because its a powerful testing tool with varieties of testing capabilities like- Functional testing, Database testing etc.
Now, lets learn JMeter Usage & Report Configuration…
Now, let better understand where JMeter can be used best?
What is Apache JMeter Used for?
In short, JMeter is a powerful tool which we can use as a load testing tool for analyzing and measuring the overall performance of a web application and variety of services
- Jmeter is an exceptional testing tool which can be used for overall performance testing of web applications and variety of other services
JMeter Report Dashboard: Overview
Dashboard Report or dashboard generator is a modular extension of JMeter. It is generally used to generate report for your testing performed after execution of the JMeter script. It prepares a detailed report at the end of load test or on demand by processing samples from CSV file into HTML report which provides numbers of metrics.
Some of the Metrics have been listed below:
- APDEX (Application Performance Index)
- Request summary graph
- Statistic table
- Error table
- Top 5 Error by Sampler
- Zoom table chart
- Response times Over Time (Includes Transaction Controller Sample Results)
- Response times Percentiles Over Time (successful responses only)
- Active Threads Over Time
- Bytes throughput Over Time (Ignores Transaction Controller Sample Results)
- Latencies Over Time (Includes Transaction Controller Sample Results)
- Connect Time Over Time (Includes Transaction Controller Sample Results)
- Hits per second (Ignores Transaction Controller Sample Results) and many more.
How to generate HTML Dashboard Report in JMeter?
CSV file to HTML Report Generator:
1. After, JMeter script gets executed successfully, Go to Tools–>Generate HTML report
2. After you click on Generate HTML report, a dialog box gets appeared, Now, browse to the location where your csv file exist. (Hint: You will most probably find your JMeter csv file at the location where your listener e.g. View Results Tree, View Results in Table etc. csv data is set to be saved after .JMX or JMeter script is executed)
- In dialog box, first option is Results file (csv or jtl)– Just browse and select csv file (Hint: Select ViewResultTree.csv or SummaryReport.csv or any which ever listeners you have added in your JMeter script)
- Second option is user properties file– Select user.properties file which you can find in bin folder of apache folder i.e. D:\apache-jmeter-5.1.1\bin in my case.
- Third option is Output directory– Just browse to an empty folder where you want to save your JMeter HTML report. (Note: Selected folder must be empty)
How to configure JMeter Dashboard?
Is it possible to configure or customize the default structure, view, metrics etc of JMeter Dashboard Report which is generated by default?
Yes, it is 100% possible to configure JMeter Dashboard Report according to your need. Let’s proceed Step By Step:
1. Change the title of JMeter HTML Report
In user.properties file under bin folder of apache Jmeter, search for “jmeter.reportgenerator.report_title” and change the title as needed
Note: We can also change other properties in this file like- filter, start_date, end_date etc. as required
2. Change Report template
In ‘apache-jmeter-5.1.1\bin\report-template\content\pages’ folder, we can modify the templates file having extension .html.fmkr
Illustration of changes done:
- Title changes done in CustomsGraphs.html.fmkr, OverTime.html.fmkr, ResponseTimes.html.fmkr, Throughput.html.fmkr
Note: Search for ‘reportTitle!’, reportTitle!”Change Title Here” and between double quotes enter your desired title.
Customise or Configure HTML Elements
- In ‘apache-jmeter-5.1.1\bin\report-template’, Remove or add HTML elements whichever is needed in ‘index.html.fmkr’
By default, I had this Structure for my Dashboard Report
Basic steps followed to configure report as I needed:
- In ‘apache-jmeter-5.1.1\bin\report-template’, Removed html elements- “Custom Graphs”, “Test & Report Informations” sections and changed bootstrap classes like modified class to col-md-12 in case of “Request Summary” and “Application Performance Index” or you can add or remove HTML elements, modify class attributes in html tags whichever is needed in ‘index.html.fmkr’
- Same you can do in ‘apache-jmeter-5.1.1\bin\report-template\content\pages’ folder, where you can modify the templates file having extension .html.fmkr like- CustomsGraphs.html.fmkr, OverTime.html.fmkr, ResponseTimes.html.fmkr, Throughput.html.fmkr as needed
By following steps mentioned above under my JMeter Report looks like this:
So, these are only steps you need to perform in order to configure your JMeter Report.
Want to learn Automation Testing using Selenium or Katalon Studio? Then, find a detailed comparision between both Click Here
Still have any questions left in your mind? Comment down below & we will be answering it as quickly as possible.