2017-05-26 83 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運行它。

回答

相關問題