Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianmo/jmeter-backend-azure
A JMeter plug-in that enables you to send test results to Azure Monitor
https://github.com/adrianmo/jmeter-backend-azure
azure azure-application-insights azure-log-analytics azure-monitor backend-listener java jmeter jmeter-plugin logs performance-testing plugin reporting
Last synced: 2 days ago
JSON representation
A JMeter plug-in that enables you to send test results to Azure Monitor
- Host: GitHub
- URL: https://github.com/adrianmo/jmeter-backend-azure
- Owner: adrianmo
- License: other
- Created: 2020-02-07T10:25:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-21T14:00:32.000Z (over 1 year ago)
- Last Synced: 2024-04-28T05:38:40.802Z (7 months ago)
- Topics: azure, azure-application-insights, azure-log-analytics, azure-monitor, backend-listener, java, jmeter, jmeter-plugin, logs, performance-testing, plugin, reporting
- Language: Java
- Homepage: https://azure.microsoft.com/services/monitor/
- Size: 513 KB
- Stars: 31
- Watchers: 4
- Forks: 12
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-jmeter - jmeter-backend-azure - JMeter plugin to send test results to Azure Application Insights. (Results Processing / Reporting & Visualization)
README
# jmeter-backend-azure
[![Build and publish](https://github.com/adrianmo/jmeter-backend-azure/actions/workflows/maven.yml/badge.svg)](https://github.com/adrianmo/jmeter-backend-azure/actions/workflows/maven.yml)
A JMeter plug-in that enables you to send test results to Azure Application Insights.
## Overview
### Description
JMeter Backend Azure is a JMeter plugin enabling you to send test results to an Azure Application Insights.
The following test results metrics are exposed by the plugin.
- TestStartTime
- SampleStartTime
- SampleEndTime
- ResponseCode
- Duration
- URL
- SampleLabel
- SampleCount
- ErrorCount
- Bytes
- SentBytes
- ConnectTime
- IdleTime
- ThreadName
- GrpThreads
- AllThreads
- (Optional) aih.{ResponseHeader}
- (Optional) ResponseData
- (Optional) SampleData### Plugin installation
Once you have built or downloaded the plugin JAR file from the [releases](https://github.com/adrianmo/jmeter-backend-azure/releases) section,
move the JAR to your `$JMETER_HOME/lib/ext`.```bash
mv target/jmeter.backendlistener.azure-VERSION.jar $JMETER_HOME/lib/ext/
```Then, restart JMeter and the plugin should be loaded.
### JMeter configuration
To make JMeter send test result metrics to Azure Application Insights, in your **Test Pan**, right click on
**Thread Group** > Add > Listener > Backend Listener, and choose `io.github.adrianmo.jmeter.backendlistener.azure.AzureBackendClient` as `Backend Listener Implementation`.
Then, in the Parameters table, configure the following attributes.| Attribute | Description | Required |
|---|---|---|
| *connectionString* | The [Connection String](https://docs.microsoft.com/en-us/azure/azure-monitor/app/sdk-connection-string?tabs=java) of your Application Insights instance | Yes |
| *testName* | Name of the test. This value is used to differentiate metrics across test runs or plans in Application Insights and allow you to filter them. | Yes |
| *liveMetrics* | Boolean to indicate whether or not real-time metrics are enabled and available in the [Live Metrics Stream](https://docs.microsoft.com/en-us/azure/azure-monitor/app/live-stream). Defaults to `true`. | No |
| *samplersList* | Optional list of samplers separated by a semi-colon (`;`) that the listener will collect and send metrics to Application Insights. If the list is empty, the listener will not filter samplers and send metrics from all of them. Defaults to an empty string. | No |
| *useRegexForSamplerList* | If set to `true` the `samplersList` will be evaluated as a regex to filter samplers. Defaults to `false`. | No |
| *responseHeaders* | Optional list of response headers separated by a semi-colon (`;`) that the listener will collect and send values to Application Insights. | No |
| *logResponseData* | This value indicates whether or not the response data should be captured. Options are `Always`, `OnFailure`, or `Never`. The response data will be captured as a string into the _ResponseData_ property. Defaults to `OnFailure`. | No |
| *logSampleData* | Boolean to indicate whether or not the sample data should be captured. Options are `Always`, `OnFailure`, or `Never`. The sample data will be captured as a string into the _SampleData_ property. Defaults to `OnFailure`. | No |
| *instrumentationKey* | The Instrumentation Key of your Application Insights instance.
⚠️ **Deprecated**: use *connectionString* instead. | No |*Example of configuration:*
![Screenshot of configuration](docs/configuration.png "Screenshot of JMeter configuration")
#### Custom properties
You can add custom data to your metrics by adding properties starting with `ai.`, for example, you might want to provide information related to your environment with the property `ai.environment` and value `staging`.
### Visualization
Test result metrics are available in the **requests** dimension of your Application Insights instance.
In the image you can see an example of how you can visualize the duration of the requests made during your test run.![Request duration](docs/requestduration.png "Screenshot of test requests duration")
Additionally, if you enabled `liveMetrics` in the configuration, you can watch your test performance in real-time in the Live Metrics Stream blade.
![Live Metrics Stream](docs/livemetrics.png "Screenshot of live metrics stream")
## Contributing
Feel free to contribute by forking and making pull requests, or simply by suggesting ideas through the
[Issues](https://github.com/adrianmo/jmeter-backend-azure/issues) section.### Build
You can make changes to the plugin and build your own JAR file to test changes. To build the artifact,
execute below Maven command. Make sure `JAVA_HOME` is set properly.```bash
mvn clean package
```---
This plugin is inspired in the [Elasticsearch](https://github.com/delirius325/jmeter-elasticsearch-backend-listener) and [Kafka](https://github.com/rahulsinghai/jmeter-backend-listener-kafka) backend listener plugins.