Maven JMeter plugin and report generation (the last steps to get it working) html

Maven JMeter plugin and report generation (the last steps to get it working)

JMeter ( a powerful tool for functional and performance testing web applications. JMeter, opposed to selenium, also works perfectly on generated applications (like Oracle ADF ). One of the key strengths of JMeter is the automation. The same test can be repeated after each (minor) release. This is a great help in executing time consuming regression testing.

We use Maven 2 ( in combination with Continuum ( as the basis of our AMIS-SoftwareStudio. With the build schema in Continuum we are able to execute both performance and functional regression testing every night (or even each hour if you like) on the most recent version of the application from our source repository.

The documentation on the JMeter wiki ( is to limited to get the JMeter plugin working at once. It does not handle the generation of reports and installing the plugin into your company repository. Most of the samples on the internet (use the Google to find Maven 2+JMeter) are based on extensive Ant scripts. The sample below shows how to get the Maven-JMeter-Plugin working in Maven2 with a minimum of extra code in your projects pom.xml.

Assume you have:

  • Java 1.5 and Maven 2.0.7 already installed
  • An internal central Maven2 repository in your network
  • And your maven settings.xml a reference to your local company repository (see below)

Add to settings.xml

    <!--   Internal repository for deployment of AMIS artifacts -->
      <!--   Put the name of your company repository here-->

Install the Maven-JMeter-Plugin:

Install the plugin:
1.    Download the Maven-Jmeter-Plugin form the apache wiki (there is no official distribution yet)  Link here.
2.    Untar these files with e.g. WinRar or WinZip.
3.    Edit the pom.xml:

a.    Remove the reference to the yahoo music repository
b.    Add a compile plugin to force usage of jdk1.5 (to avoid compile errors)
The pom.xml should look like this (Link download):

4.    Go to the maven-jmeter-plugin folder and deploy the plugin in your local company repository:   mvn deploy (you can check first  if it works by using mvn install)

5.    The Maven JMeter plugin is now installed and available in your internal repository.

 Getting your project working with the JMeter plugin:

 This section is an extension on the information from the JMeter Wiki.

  1. Create a src/test/jmeter directory, and place your JMeter load tests there.
  2. Create a file in src/test/jmeter. Just copy the default properties file from the JMeter install.
  3. Edit the  and change the to XML ( to force JMeter to produce XML files in stead of CSV files.
  4. Optionally configure includes and excludes in your pom.xml for which tests to run. If you don’t, it will just run **/*.jmx.
  5. Add a reference to in your pom. This is some place where maven can download jmeter-2.2.jar. (other locations are also valid (use the Google)).  
  6. Add the Maven JMeter plugin and link it to the Verify phase of your project. This way it is automatically executed after deployment of the application on the target platform.
  7. Run the mvn verify command to start the JMeter tests.

Creating the JMeter results report:

This section explains how to generate a JMeter Report after executing the tests.

  1. Create a test_resources\jmeter\jakarta-jmeter-2.2\extras folder and add the following files form the JMeter Extras install: collapse.jpg; expand.jpg; jmeter-results-detail-report_21.xsl ; jmeter-results-report_21.xsl
  2. Add the xml-maven-plugin to force transition of the jmeter results.xml to HTML.
  3. Use the Filemapper option to rename the files to HTML
                 <fileMapper implementation="">


4.    Finally use antrun to copy the expand and collaps images to the generated target files. (see sample below)

5.    In continuum you can use the command mvn verify site-deploy to run the jmeter tests and deploy the results within the project site.

<!-- make sure the jmeter icons are copied to the site folder -->
                     <copy file="test_resources\jmeter\jakarta-jmeter-2.2\extras\expand.jpg"
                     <copy file="test_resources\jmeter\jakarta-jmeter-2.2\extras\collapse.jpg"


  1. Ardesco February 9, 2012
  2. Marco October 4, 2007
  3. Lean October 1, 2007
  4. Lean August 30, 2007
  5. Robbrecht van Amerongen August 14, 2007
  6. Lean August 13, 2007
  7. Robbrecht van Amerongen August 13, 2007
  8. Robbrecht van Amerongen August 13, 2007
  9. Lean August 10, 2007