This repository contains everything you need to visualize and analyze the results of JMeter testing.
- backend-listener folder contains custom backend listener to send metrics to influxdb 2.0.
- grafana-dashboards folder contains 3 grafana dashboards for different purposes.
- flask-grafana-buttons folder contains python code of Flask server to make grafana buttons responsive.
- JMeter 5.4.1^
- InfluxDB 2.0^
- Grafana 8.1.2^
First things first: JMeter
First you need to put the backend-listener plugin to JMeter /lib/ext/ folder.
I would also recommend updating the following timeout configuration in the properties file:
#Influxdb timeouts backend_influxdb.connection_timeout=3000 backend_influxdb.socket_timeout=5000 backend_influxdb.connection_request_timeout=1000
When importing dashboards, do not change the uid, this will break the connection between the dashboards.
- Button Panel plugin.
The main dashboard contains 2 tables: the test log, which displays each test and creates a link to a separate dashboard with test results.
And a baseline table that represents only the baselines for each test profile.
JMeter test results
This dashboard visualizes all JMeter metrics.
At the top of the dashboard you can choose:
- testProfile: application name
- Test Id of the test
- Sample Type. In jmeter terminology, there are transactions and requests. For example, when you log in to the application, you perform one action or one transaction, but the browser sends several http requests to the server. Thus, a transaction is one logical action, requests are all http requests.
- Aggregation level: granularity of the graphs
- RFC is used when you mark test results as a baseline
Also on the dashboard you can find:
-timeseries graphs and tables
Also on top of the dashboards there are several buttons:
- You can mark the test results as a baseline. To do this, please enter the RFC number or leave it blank. Then click on the “Mark as a baseline” button.
After it, test will be displayed in Baseline table on main dashboard.
- You can mark the test as “Unacceptable”.
- You can delete the test status, this means that the test will be without identifier (baseline or unacceptable).
- Or you can completely delete test results.
JMeter Load Test Comparison
This dashboard is used to compare the current test results with the baseline.
After the test is completed:
- Choose testProfile
- Baseline Test Id (Note: you need to mark at least one test as a baseline so that you can compare the test results)
- Current Test Id
- Sample Type
- After you have selected all the necessary parameters, please wait a little, it will take some time to collect the metrics of both tests.
- Then you will be able to compare stats
- And Average and Median response times of both tests
Flask grafana server
It is used to make Grafana buttons responsive, can be installed on the same server as graphana or influxdb.
Note: Don’t forget to update Influxdb2 configuarion like url and token.
To start the server, run start.py file, it will launch the server on port 5000 and will listen for requests from the grafana buutons and make requests to influxdb.