未能执行目标com.lazerycode.jmeter:jmeter maven插件:1.10.0
在使用Maven执行Jmeter脚本期间,我遇到了一个问题: Maven版本:3.2.1 Jmeter版本:2.11 我还尝试使用mvnjmeter:Jmeter-dpperformancethreadcount=3从命令行运行Jmeter脚本,但在两个命令行中都遇到了相同的错误&使用Jenkins未能执行目标com.lazerycode.jmeter:jmeter maven插件:1.10.0,jmeter,Jmeter,在使用Maven执行Jmeter脚本期间,我遇到了一个问题: Maven版本:3.2.1 Jmeter版本:2.11 我还尝试使用mvnjmeter:Jmeter-dpperformancethreadcount=3从命令行运行Jmeter脚本,但在两个命令行中都遇到了相同的错误&使用Jenkins Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.10.0:jmeter (default-cli) on p
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>
如果我缺少任何配置,请提供指导或解决方案,或者让我知道
谢谢 我发现您的配置有两个问题: mvnjmeter:JMeter命令将无法工作,除非您安装了一些自定义插件 你有 performancetest.threadCount-在pom.xml中 performancethreadCount-在命令行中 这些属性名称必须相同 请按照以下步骤解决问题: 在中,将线程数定义为
${__P(threadCount,)}
您的测试结构应如下所示:
pom.xml
src
测验
性能测试
yourtest.jmx
按以下方式执行测试:
mvn-DPPerformanceTest.threadCount=3清洁验证
或
请参阅wiki页面以获取一般信息和指南,获取有关Maven驱动的其他提示以及如何执行JMeter测试的其他选项。我已更正了选项3:使用ApacheMaven中定义的步骤。我还删除了threadcount参数,并将其保持为静态值&从根文件夹中使用mvnverify或mvninsall命令运行Jmeter脚本。还可以运行Jmeter的Test.jmx脚本来检查与maven的集成,但会遇到相同的错误。请告诉我还需要进行哪些其他更正。谢谢
mvn -Dperformancetest.threadCount=3 clean install