9
votes

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
2
Did you find a solution for this? I'm having the same questions/problems with load testing and azure devops.pieter.lowie
Hello what is the good alternative to use in Azure pipelines?variable

2 Answers

1
votes

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.

0
votes

Are you aware of Cloud-based Apache JMeter Load Test task

# Cloud-based Apache JMeter Load Test
# Runs the Apache JMeter load test in cloud
- task: ApacheJMeterLoadTest@1
  inputs:
    #connectedServiceName: # Optional
    testDrop: 
    loadTest: 'jmeter.jmx' 
    agentCount: '2' 
    #runDuration: '60' # Options: 60, 120, 180, 240, 300
    #geoLocation: 'Default' # Optional. Options: default, australia East, australia Southeast, brazil South, central India, central US, east Asia, east US 2, east US, japan East, japan West, north Central US, north Europe, south Central US, south India, southeast Asia, west Europe, west US
    #machineType: '0' # Optional. Options: 0, 2

If you want to do it all manually you can create the VMs using Azure CLI or REST API and once done you can download JMeter installation and configure it according to your test scenario.