[英]Automation of JMeter tests using Maven
我已經在我的應用程序中通過 lazycode 包含了 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 運行它?
你快到了,只運行 JMeter 測試的正確 Maven 命令是:
mvn jmeter:jmeter -Pjmeter
參考資料:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.