如何使用jmeter.maven.plugin使用多个输入文件运行多个jmeter.jmx测试
我需要能够使用mvn和jmeter maven插件从jenkins运行jmeter测试 以下是文件设置:如何使用jmeter.maven.plugin使用多个输入文件运行多个jmeter.jmx测试,maven,jmeter,jmx,jmeter-maven-plugin,Maven,Jmeter,Jmx,Jmeter Maven Plugin,我需要能够使用mvn和jmeter maven插件从jenkins运行jmeter测试 以下是文件设置: test_dev.jmx test_dev.txt test_dev_regression.jmx test_dev_regression.txt 以下是mvn命令使用的pom文件(如下所示): 如您所见,目前没有正在运行的回归测试。我想将回归测试及其输入文件添加到这个pom中,这样两个测试就可以一个接一个地运行。我要挂断的是属性。要使用另一个输入文件进行回归测试,这里需要指定什么?或者,
test_dev.jmx
test_dev.txt
test_dev_regression.jmx
test_dev_regression.txt
以下是mvn命令使用的pom文件(如下所示):
如您所见,目前没有正在运行的回归测试。我想将回归测试及其输入文件添加到这个pom中,这样两个测试就可以一个接一个地运行。我要挂断的是
属性。要使用另一个输入文件进行回归测试,这里需要指定什么?或者,是否有其他方法可以使用此框架使用多个输入运行多个测试
提前谢谢 从3.0.0版开始,您现在应该能够执行此操作,显示设置的示例执行块是:
<executions>
<execution>
<id>configuration-one</id>
<goals>
<goal>configure</goal>
</goals>
<configuration>
<resultsFileFormat>xml</resultsFileFormat>
</configuration>
</execution>
<execution>
<id>configuration-two</id>
<goals>
<goal>configure</goal>
</goals>
<configuration>
<resultsFileFormat>csv</resultsFileFormat>
</configuration>
</execution>
<execution>
<id>performance test one</id>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<selectedConfiguration>configuration-one</selectedConfiguration>
<testFilesIncluded>
<jMeterTestFile>test1.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
</execution>
<execution>
<id>performance test two</id>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<selectedConfiguration>configuration-two</selectedConfiguration>
<testFilesIncluded>
<jMeterTestFile>test2.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
</execution>
</executions>
配置一
配置
xml
配置二
配置
csv
性能测试一
性能测试
配置一
test1.jmx
性能测试二
性能测试
配置二
test2.jmx
显示此行为的IT测试(上面的执行示例取自此测试)可在上获得。请参阅没有任何输入文件的测试。我的要求是,需要使用各自的输入文件运行多个测试。我认为这是可能的,但我不确定。该插件目前不支持并行运行多个.jmx文件。为此,您需要在不同的终端窗口/选项卡中运行多个实例
mvn verify -DEnvironment=$TEST_ENVIRONMENT
<executions>
<execution>
<id>configuration-one</id>
<goals>
<goal>configure</goal>
</goals>
<configuration>
<resultsFileFormat>xml</resultsFileFormat>
</configuration>
</execution>
<execution>
<id>configuration-two</id>
<goals>
<goal>configure</goal>
</goals>
<configuration>
<resultsFileFormat>csv</resultsFileFormat>
</configuration>
</execution>
<execution>
<id>performance test one</id>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<selectedConfiguration>configuration-one</selectedConfiguration>
<testFilesIncluded>
<jMeterTestFile>test1.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
</execution>
<execution>
<id>performance test two</id>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<selectedConfiguration>configuration-two</selectedConfiguration>
<testFilesIncluded>
<jMeterTestFile>test2.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
</execution>
</executions>