【发布时间】:2018-10-04 03:22:48
【问题描述】:
我的 Jmeter 测试计划有两个线程。每个线程使用不同的 CSV 文件,运行单独的测试。
我希望它在执行结束时生成两个 JTL 文件。为了实现这一点,我按照此处Jmeter: Test plan has two thread groups but it generated only 1 jtl report 的建议为每个线程添加了单独的Aggregate Table 侦听器。它仍然没有生成 JTL 文件。所以我将 Jmeter 从 3.2 升级到 5.0,将 Jmeter Maven 插件从 2.1.0 升级到 2.7.0。现在它正在生成两个单独的 CSV 文件,而不是 JTL 文件。
我做错了什么?还是插件的限制,它不会生成 JTL 文件?
我正在使用 Maven 3、Windows 7、Java
POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.demo.performancetesting</groupId>
<artifactId>demo-performance-testing</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.7.0</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.codecentric</groupId>
<artifactId>jmeter-graph-maven-plugin</artifactId>
<version>0.1.0</version>
<configuration>
<configuration>
<resultsFileFormat>xml</resultsFileFormat>
<generateReports>false</generateReports>
</configuration>
<inputFile>${project.build.directory}/jmeter/results/*.jtl</inputFile>
<graphs>
<graph>
<pluginType>ResponseTimesOverTime</pluginType>
<width>800</width>
<height>600</height>
<outputFile>${project.build.directory}/jmeter/results/BlazeDemoRequest.png</outputFile>
</graph>
</graphs>
</configuration>
</plugin>
</plugins>
</build>
</project>
【问题讨论】:
-
尝试使用支持 JMeter 5 的最新版本 2.8.0
标签: jmeter maven-3 jmeter-maven-plugin