Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Markup corrected

...

Note

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 3 plugin that allows you to run JMeter tests as part of the build.

...

  • Create a src/test/jmeter directory, and place your JMeter load tests there.
  • Add the plugin to your pom.xml

    No Format
    +---+
    <project>
        [...]
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.lazerycode.jmeter</groupId>
                        <artifactId>jmeter-maven-plugin</artifactId>
                        <version>2.8.5</version>
                        <executions>
                            <execution>
                                <id>jmeter-tests</id>
                                <goals>
                                    <goal>jmeter</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>jmeter-check-results</id>
                                <goals>
                                    <goal>results</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
        [...]
    </project>
    +---+
    


...

  • Run "mvn clean verify" to run the tests (Best practice 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/jmeter-maven-plugin/jmeter-maven-plugin

...