簡體   English   中英

使用 Maven 自動化 JMeter 測試

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM