我jmeter-maven-plugin (version 1.10.0)
用来运行JMeter测试。我想更改结果文件的默认名称,所以我想更改以下参数option -l (logfile)
:
[debug] JMeter is called with the following command line arguments: -n
-t C:\XX\JMeter\src\test\jmeter\some-test.jmx
-l C:\XX\JMeter\target\jmeter\results\20150323-some-test.jtl
-d C:\XX\JMeter\target\jmeter
-j C:\XX\JMeter\target\jmeter\logs\some-test.jmx.log
编辑:我使用 IntelliJ 运行它:mvn integration-test -Prun-some-test
我已经定义了两个配置文件(用于两个不同的测试文件):
<profile>
<id>run-some-test</id>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<testFilesIncluded>
<jMeterTestFile>some-test.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-another-test</id>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<testFilesIncluded>
<jMeterTestFile>another-test.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>