首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在构建管道中在Azure JMeter上运行分布式DevOps测试

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

Stack Overflow用户
提问于 2019-03-23 22:08:03
回答 2查看 2.8K关注 0票数 9

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

我看不出该怎么做:

  • 使用类似于此的方法
  • 使用JMeter核心分布式测试,我需要设置一个主节点和从节点,但是我不知道如何在管道中完成,因为我需要启动多个vms
EN

回答 2

Stack Overflow用户

发布于 2020-02-03 12:09:39

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

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

代码语言:javascript
复制
<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启动/destroying,使用/destroying脚本启动管道中的新VM机器。

票数 1
EN

Stack Overflow用户

发布于 2019-03-25 09:53:22

你知不知道基于云的Apache JMeter负载测试任务

代码语言:javascript
复制
# 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

如果您想手动完成所有操作,可以使用Azure CLIREST API创建VM,完成后可以下载JMeter安装和根据您的测试场景配置它

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55318835

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档