Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running distributed JMeter test on Azure DevOps within build pipeline

I need to do distributed load testing in Azure with JMeter.

I don't see how to proceed to do it:

  • Using an approach similar to this one
  • Using JMeter core distributed testing, I would need to setup 1 master and slave nodes, but I don't see how to do it in a pipeline as I would need to start multiple vms
like image 543
Yution Lio Avatar asked Mar 23 '19 22:03

Yution Lio


People also ask

How do I use Azure DevOps pipeline JMeter?

In your pipeline, in the JMeter tool installer task, under plugins, enter jmeter. backendlistener. azure in order to install the plugin on the build agent as well. Create an Azure Application Insights resource and copy the Instrumentation Key.

Can we integration JMeter with azure DevOps?

file from azure devops. Runs build.sh, which spins the container running Jmeter. Runs Junit_Converter.py, which converts the jtl result file into Junit report which can be uploaded and rendered within azure devops.

Can distributed testing is done by JMeter?

Distributed testing enables having a local JMeter (master) that handles the test execution, together with multiple remote JMeter instances (slaves) that will send the request to our target server. But before being able to run JMeter in a distributed way, there are a couple of simple steps you must perform.


1 Answers

One of the best ways to use JMeter in Azure pipelines is configuring your performance test cases as a maven project. As a result you don't need to use the deprecated Cloud-based Apache JMeter Load Test task.

There is an existing plugin that helps you with this:

<plugins>
                <plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>2.9.0</version>
                    <executions>
                        <execution>
                            <id>jmeter-tests</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <resultsFileFormat>xml</resultsFileFormat>
                        <propertiesUser>
                            <hostname>${test.hostname}</hostname>
                            <env>${test.env}</env>
                        </propertiesUser>
                    </configuration>
                </plugin>
            </plugins>

More information is available here :

  1. https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Basic-Configuration.
  2. https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Remote-Server-Configuration

I have been working with this plugin for a year now and it has amazing support.

I am using Terraform for starting /destroying the new VM machines in the pipeline using shell scripts.

like image 150
sjmach Avatar answered Sep 17 '22 22:09

sjmach