Differences between revisions 12 and 13
Revision 12 as of 2013-04-14 10:55:44
Size: 1930
Editor: Ardesco
Comment:
Revision 13 as of 2014-01-18 11:04:35
Size: 1932
Editor: Ardesco
Comment: Updated POM example to use latest revison of plugin
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
This is a Maven 2 plugin that allows you to run JMeter tests as part of the build. This is a Maven 2/3 plugin that allows you to run JMeter tests as part of the build.
Line 28: Line 28:
                    <version>1.8.1</version>                     <version>1.9.0</version>

Please note: the JMeter Maven plugin is a 3rd party product; it is not part of the Apache JMeter project

JMeter Maven Plugin

This is a Maven 2/3 plugin that allows you to run JMeter tests as part of the build.

Install the Plugin

This plugin is available from the maven central repository, as long as you have a working install of maven you only need to create a valid pom.xml that references this plugin.

Basic Configuration

  • Create a src/test/jmeter directory, and place your JMeter load tests there.
  • Add the plugin to your pom.xml
    +---+
    <project>
        [...]
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.lazerycode.jmeter</groupId>
                        <artifactId>jmeter-maven-plugin</artifactId>
                        <version>1.9.0</version>
                        <executions>
                            <execution>
                                <id>jmeter-tests</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jmeter</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
        [...]
    </project>
    +---+

Executing the Plugin

  • Run "mvn verify" to run the tests (Best practive would be to assign the JMeter tests to a specific profile so that they only run when invoking that profile).

External Links

The source code for this plugin can be found at https://github.com/Ronnie76er/jmeter-maven-plugin

The official website is available at http://jmeter.lazerycode.com

The github wiki has more detailed configuration information and is available at https://github.com/Ronnie76er/jmeter-maven-plugin/wiki

JMeterMavenPlugin (last edited 2014-01-18 11:04:35 by Ardesco)