Customize a load test with Apache JMeter plugins and Azure Load Testing
In this article, you learn how to use an Apache JMeter plugin in your load test script with Azure Load Testing. You can extend the core functionality of Apache JMeter by using plugins. For example, to add functionality for performing data manipulation, to implement custom request samplers, and more.
Azure Load Testing lets you use plugins from https://jmeter-plugins.org, or upload a Java archive (JAR) file with your own plugin code. You can use multiple plugins in a load test.
Azure Load Testing preinstalls plugins from https://jmeter-plugins.org on the load test engine instances. For other plugins, you add the plugin JAR file to the load test configuration.
- An Azure account with an active subscription. If you don't have an Azure subscription, create a free account before you begin.
- An Azure Load Testing resource. To create a Load Testing resource, see Create and run a load test.
- (Optional) Apache JMeter GUI to author your test script. To install Apache JMeter, see Apache JMeter Getting Started.
Reference a JMeter plugin in your test script
To reference a JMeter plugin in your JMeter script by using the JMeter GUI, first install the plugin on your local JMeter instance in either of two ways:
- Use the Plugins Manager, if the plugin is available.
- To use your own plugin code, copy the plugin JAR file to the
lib/extfolder of your local JMeter installation.
After you install the plugin, the plugin functionality appears in the Apache JMeter user interface. You can now reference it in your test script. The following screenshot shows an example of how to use an Example Sampler plugin:
You can also reference the JMeter plugin directly by editing the JMX file. In this case you don't have to install the plugin locally.
Upload the JMeter plugin JAR file to your load test
To use your own plugins during the load test, you have to upload the plugin JAR file to your load test. Azure Load Testing then installs your plugin on the load test engines.
You can add a plugin JAR file when you create a new load test, or anytime when you update an existing test.
For plugins from https://jmeter-plugins.org, you don't need to upload the JAR file. Azure Load Testing automatically configures these plugins for you.
We recommend that you build the executable JAR using Java 17.
Follow these steps to upload a JAR file by using the Azure portal:
In the Azure portal, go to your Azure Load Testing resource.
On the left pane, select Tests to view a list of tests.
Select Create > Upload a JMeter script to create a new load test by using a JMeter script.
Alternately, if you have an existing load test, select the test from the list by selecting the checkbox, and then select Edit.
Select the Test plan tab.
Select the JAR file from your computer, and then select Upload to upload the file to Azure.
Select Apply to modify the test, or select Review + create to create the test.
When the test runs, Azure Load Testing deploys the plugin on each test engine instance.
- Learn how to Download JMeter logs to troubleshoot a load test.
- Learn how to Monitor server-side application metrics.
- Learn how to Automate load tests with CI/CD.
Submit and view feedback for