azure - 在构建管道中的 Azure DevOps 上运行分布式 JMeter 测试

标签 azure jmeter azure-devops performance-testing jmeter-plugins

我需要使用 JMeter 在 Azure 中进行分布式负载测试。

我不知道如何继续执行此操作:

  • 使用与此类似的方法 one
  • 使用 JMeter 核心分布式测试,我需要设置 1 个主节点和从节点,但我不知道如何在管道中执行此操作,因为我需要启动多个虚拟机

最佳答案

在 Azure 管道中使用 JMeter 的最佳方法之一是将性能测试用例配置为 Maven 项目。因此,您不需要使用已弃用的基于云的 Apache JMeter 负载测试任务。

有一个现有的插件可以帮助您完成此操作:

<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>

更多信息请参见此处:

  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

我已经使用这个插件一年了,它拥有令人惊叹的支持。

我正在使用Terraform用于使用 shell 脚本启动/销毁管道中的新 VM。

关于azure - 在构建管道中的 Azure DevOps 上运行分布式 JMeter 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55318835/

相关文章:

javascript - 将 MSAL.js 用于 NodeJ

maven - jmeter 插件 maven test-jar

performance - JMeter:高斯随机计时器与泊松随机计时器

tfs - 在 Visual Studio Online 中设置门控 checkin 构建选项

Azure 静态 Web 应用程序部署错误 : The app build failed to produce artifact folder

c# - 从 Razor 页面上传到 Azure 文件共享

java - 在java中连接到https服务——主机名中有 "_"?

php - PHP Web 应用程序的服务器端性能测试

azure - 管道迁移是否有效 - 一直在使用它并收到错误没有名为该端点或同名的重复端点

azure-devops - CS0579 : Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute'