How to use jmeter 3.2 with jmeter-maven-plugin?
I am using Apache JMeter to test the performance of my web application via com.lazerycode.jmeter: jmeter-maven-plugin. Since version 3.2 brings about a lot of changes, I wondered if I could use this version in the jmeter-maven-plugin (this is not part of the Apache JMeter project).
I tried the following:
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<jmeterVersion>3.2</jmeterVersion>
<jMeterProcessJVMSettings>
<xms>1024</xms>
<xmx>1024</xmx>
<arguments>
<argument>-Xprof</argument>
<argument>-Xfuture</argument>
</arguments>
</jMeterProcessJVMSettings>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>test</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
The standard version for jmeter in the jmeter-maven-plugin is 3.1. I found this to point the libraries: https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Specifying-JMeter-Version
The configuration above didn't work for me. I am getting NPE (Pointer Exception).
[INFO] >>> jmeter-maven-plugin:2.1.0:jmeter (jmeter-tests) > :configure @ EAdresseBatchImportCapacityTests >>>
[INFO]
[INFO] --- jmeter-maven-plugin:2.1.0:configure (configure) @ EAdresseBatchImportCapacityTests ---
[INFO] -------------------------------------------------------
[INFO] Configuring JMeter...
[INFO] -------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.136 s
[INFO] Finished at: 2017-04-28T13:28:40+02:00
[INFO] Final Memory: 20M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.1.0:configure (configure) on project EAdresseBatchImportCapacityTests: Failure to find org.apache.jmeter:ApacheJMeter_monitors:jar:3.2 in http://maven-repository.11.am-gruppe.de:8090/nexus/content/groups/gdis was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
If I use the old library (ApacheJMeter_monitors: jar: 3.1) as described in the above link, it doesn't work (NPE), the new library does not exist because the monitor-package has been removed from the project dependency. (as you can see here: https://jmeter.apache.org/usermanual/build-monitor-test-plan.html )
Do I have to wait for the new version of jmeter-maven-plugin?
Perhaps one of you can help me figure out how I can get it to work. Thanks in advance.
source to share
Edit on May 17, 2017:
The maven plugin for 2.2.0 for JMeter 3.2 has been released with the following release notes:
Previous answer before release:
The maven plugin for JMeter 3.2 is not released yet:
Maybe leave a comment on the issue for the author.
To fix this problem, edit your pom.xml and add:
<configuration>
<jmeterVersion>3.2</jmeterVersion>
<jmeterArtifacts>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_components:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_config:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_core:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_ftp:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_functions:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_http:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_java:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_jdbc:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_jms:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_junit:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_ldap:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_mail:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_mongodb:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_native:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:ApacheJMeter_tcp:3.2</jmeterArtifact>
<jmeterArtifact>org.apache.jmeter:jorphan:3.2</jmeterArtifact>
</jmeterArtifacts>
</configuration>
source to share
Check here how you can use JMeter with Maven from the link below -
https://www.blazemeter.com/blog/how-use-jmeter-maven-plugin
Here are step-by-step instructions for integrating Maven with JMeter.
Hope it helps !!
source to share