【发布时间】:2019-03-05 14:46:39
【问题描述】:
我的 Jmeter 测试计划有两个线程。两个线程都需要单独的 CSV(csv 参数化)文件。
在测试mvn verify 结束时,我希望生成两个.jtl 文件,但只得到一个。似乎只有 1 个线程正在运行。当我在 GUI 中运行时,它可以正常工作,无需 maven。
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.1.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>
<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>
我已经浏览过这些帖子,但没有运气:
Can we run two thread groups parallely in a single test plan in Jmeter?
Why only 2 out 3 JMeter Thread group execute?
我正在使用 Windows 7、Maven 3、Jmeter Maven 插件
【问题讨论】:
-
您能展示一下您是如何配置导出 jtl 的侦听器的吗?并显示你的 pom.xml
-
添加了 pom 和测试计划。我没有任何听众可以生成
.jtl。也许jmeter-maven-plugin正在为我做这件事。
标签: multithreading maven jmeter jmeter-maven-plugin