首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能执行目标com.lazerycode.jmeter:jmeter-maven-plugin:1.10.0

未能执行目标com.lazerycode.jmeter:jmeter-maven-plugin:1.10.0
EN

Stack Overflow用户
提问于 2015-09-04 12:35:30
回答 1查看 1.9K关注 0票数 0

我在使用Maven : Maven版本:3.2.1Jmite版本: 2.11执行Jmeter脚本时遇到了问题,我还尝试使用"mvn : Jmeter -DperformancethreadCount=3“从命令行运行Jmeter脚本,但在这两个命令行(命令行和Jenkins)中都面临相同的错误。

代码语言:javascript
复制
  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>

请提供指导或解决方案,或让我知道,如果我错过了任何配置。

谢谢..

EN

回答 1

Stack Overflow用户

发布于 2015-09-06 12:36:51

我可以看到你的配置有两个问题:

  • 除非您安装了一些自定义插件,否则mvn JMeter:JMeter命令将无法工作
  • 你有
代码语言:javascript
复制
- `performancetest.threadCount` - in the "pom.xml"
- `performancethreadCount` - in the command line

这些属性名称必须是相同的

按照接下来的步骤解决问题:

  1. JMeter螺纹组中,将“线程数”定义为 ${__P(threadCount,)}
代码语言:javascript
复制
1. Your test structure should look as follows:
代码语言:javascript
复制
    - pom.xml
    - src
    - test  
        - jmeter
        - yourtest.jmx

代码语言:javascript
复制
1. Execute your tests as:

mvn -Dperformancetest.threadCount=3干净验证

mvn -Dperformancetest.threadCount=3干净安装

请参阅JMeter Maven插件 wiki页面获取一般信息和不使用JMeter GUI启动JMeter测试的五种方法指南,以获得关于Maven驱动的额外提示和关于如何执行JMeter测试的其他选项。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32398239

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档