2017-05-26 44 views
1

我的应用程序中包含了由lazycode提供的Jmeter插件。使用Maven进行Jmeter测试的自动化

<build> 
    <pluginManagement> 
    <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> 
    </plugins> 
    </pluginManagement> 
</build> 

这个运行当我使用mvn verify。但是,它也可以运行所有集成测试和单元测试。我不希望发生这种情况。我只想运行mvn jmeter:jmeter并运行性能测试。

如果我跑mvn jmeter:jmeter,我得到

No plugin found for prefix 'jmeter' in the current project and in the plugin groups [org.sonarsource.scanner.maven, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories 

我不想配置全球.m2/settings.xml。如何使用maven运行它。

回答