运行时,我在测试计划中使用非默认线程组/插件
mvn clean verify
maven生成错误
missing class com.thoughtworks.xstream.converters.ConversionException:
[INFO] ---- Debugging information ----
[INFO] cause-exception : com.thoughtworks.xstream.converters.ConversionException
然而,在maven命令行控制台中,我看到了download dependency = true
target\jmeter\lib\ext with downloadExtensionDependencies set to true ...
target\jmeter\lib\junit with downloadLibraryDependencies set to true
target\jmeter\lib with downloadLibraryDependencies set to true ...
这是我的pom.xml
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>${jmeter.maven.plugin.version}</version>
<configuration>
<testFilesIncluded>
<jMeterTestFile>google.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
<execution>
<id>jmeter-check-results</id>
<goals>
<goal>results</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
问题:
答案 0 :(得分:1)
如果您的测试依赖于Custom Thread Groups,您需要在pom.xml
中添加几行以告诉JMeter Maven插件下载并安装此插件,您的配置应如下所示:
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>${jmeter.maven.plugin.version}</version>
<configuration>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins-casutg:2.5</artifact>
</jmeterExtensions>
<testFilesIncluded>
<jMeterTestFile>google.jmx</jMeterTestFile>
</testFilesIncluded>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
<execution>
<id>jmeter-check-results</id>
<goals>
<goal>results</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
更多信息: