我在使用Maven : Maven版本:3.2.1Jmite版本: 2.11执行Jmeter脚本时遇到了问题,我还尝试使用"mvn : Jmeter -DperformancethreadCount=3“从命令行运行Jmeter脚本,但在这两个命令行(命令行和Jenkins)中都面临相同的错误。
Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.10.0:jmeter (default-cli) on project Jmeter_Integration: D:\svn_workspace\Jmeter_Integration\target\jmeter\results\Jmeter_Jenkins.jtl (The system cannot find the file specified) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
<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>Jmeter_Integration</groupId>
<artifactId>Jmeter_Integration</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Jmeter_Integration</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.10.0</version>
<configuration>
<testResultsTimestamp>false</testResultsTimestamp>
<propertiesUser>
<threadCount>${performancetest.threadCount}</threadCount>
</propertiesUser>
<propertiesJMeter>
<jmeter.save.saveservice.thread_counts>true</jmeter.save.saveservice.thread_counts>
</propertiesJMeter>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>请提供指导或解决方案,或让我知道,如果我错过了任何配置。
谢谢..
发布于 2015-09-06 12:36:51
我可以看到你的配置有两个问题:
mvn JMeter:JMeter命令将无法工作- `performancetest.threadCount` - in the "pom.xml"
- `performancethreadCount` - in the command line这些属性名称必须是相同的。
按照接下来的步骤解决问题:
1. Your test structure should look as follows: - pom.xml
- src
- test
- jmeter
- yourtest.jmx
1. Execute your tests as:mvn -Dperformancetest.threadCount=3干净验证
或
mvn -Dperformancetest.threadCount=3干净安装
请参阅JMeter Maven插件 wiki页面获取一般信息和不使用JMeter GUI启动JMeter测试的五种方法指南,以获得关于Maven驱动的额外提示和关于如何执行JMeter测试的其他选项。
https://stackoverflow.com/questions/32398239
复制相似问题