I have included JMeter plugin by lazycode in my application.
<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>
This runs when I use mvn verify
. But, it runs all integration tests and unit tests too. I don't want this to happen. I want to run just mvn jmeter:jmeter
and run performance tests.
If I run mvn jmeter:jmeter
, I get
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
I don't want to configure global .m2/settings.xml
. How to run it using Maven?
You are almost there, the correct Maven command to run only JMeter tests would be:
mvn jmeter:jmeter -Pjmeter
References: