Perfana JMeter Maven Plugin

Forked from jmeter-maven-plugin, with Perfana integration.

License

License

Categories

Categories

Maven Build Tools JMeter Application Testing & Monitoring
GroupId

GroupId

io.perfana
ArtifactId

ArtifactId

perfana-jmeter-maven-plugin
Last Version

Last Version

1.2.6
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Perfana JMeter Maven Plugin
Forked from jmeter-maven-plugin, with Perfana integration.
Project URL

Project URL

https://perfana.io
Source Code Management

Source Code Management

https://github.com/perfana/perfana-jmeter-maven-plugin

Download perfana-jmeter-maven-plugin

How to add to project

<plugin>
    <groupId>io.perfana</groupId>
    <artifactId>perfana-jmeter-maven-plugin</artifactId>
    <version>1.2.6</version>
</plugin>

Dependencies

compile (12)

Group / Artifact Type Version
org.apache.ant : ant jar 1.10.5
org.apache.maven : maven-plugin-api jar 3.5.0
org.apache.maven : maven-core jar 3.5.0
joda-time : joda-time jar 2.9.9
commons-io : commons-io jar 2.6
org.eclipse.aether : aether-api jar 1.1.0
org.eclipse.aether : aether-util jar 1.1.0
com.jayway.jsonpath : json-path jar 2.4.0
org.slf4j : slf4j-api jar 1.7.25
ch.qos.logback : logback-core jar 1.2.3
ch.qos.logback : logback-classic jar 1.2.3
io.perfana : perfana-java-client jar 1.3.5

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5

test (4)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : java-hamcrest jar 2.0.0.0
org.mockito : mockito-core jar 2.22.0
net.bytebuddy : byte-buddy jar 1.9.0

Project Modules

There are no modules declared in this project.

JMeter Maven Plugin

License Build Status codecov

GitHub release Maven Central Javadocs JitPack

Join the chat at https://gitter.im/jmeter-maven-plugin/jmeter-maven-plugin Stack Overflow Twitter

A Maven plugin that provides the ability to run JMeter tests as part of your build

See the CHANGELOG for change information.

All the documentation you need to configure the plugin is available on the github wiki.

Last version is 2.8.0 requires Maven >= 3.5.0 and is compatible with Apache JMeter 5.0.

This plugin requires a JDK between 8 and 10. Java 11 will not work due to this Java bug.

See this for a possible workaround on Java 11.

Basic Usage

Add the plugin to your project

Add the plugin to the build section of your pom's project :

<plugin>
    <groupId>io.perfana</groupId>
    <artifactId>perfana-jmeter-maven-plugin</artifactId>
    <version>2.8.0</version>
    <executions>
	   <!-- Run JMeter tests -->
       <execution>
            <id>jmeter-tests</id>
            <goals>
                <goal>jmeter</goal>
            </goals>
       </execution>
       <!-- Fail build on errors in test -->
       <execution>
            <id>jmeter-check-results</id>
            <goals>
                <goal>results</goal>
            </goals>
       </execution>
    </executions>
    <configuration>
	    <!-- Perfana specific settings (example) -->
        <perfanaEnabled>true</perfanaEnabled>
        <perfanaUrl>http://localhost:4000</perfanaUrl>
        <perfanaAssertResultsEnabled>true</perfanaAssertResultsEnabled>
        <perfanaApplication>Afterburner</perfanaApplication>
        <perfanaTestEnvironment>stokpop-local</perfanaTestEnvironment>
        <perfanaTestRunId>run-2</perfanaTestRunId>
        <perfanaApplicationRelease>${project.version}</perfanaApplicationRelease>
        <perfanaTestType>JMETER</perfanaTestType>
            <scheduleEvents>
                <scheduleEvent>PT5S|restart|{ server:'myserver' replicas:2 tags: [ 'first', 'second' ] }</scheduleEvent>
                <scheduleEvent>PT10S|heapdump|durationInMillis=15000</scheduleEvent>
                <scheduleEvent>PT15S|fail-over|server=myserver.example.com;port=1567</scheduleEvent>
                <scheduleEvent>PT1M|scale-down|{ replicas:2 }</scheduleEvent>
            </scheduleEvents>
            <perfanaEventProperties>
                <nl.stokpop.perfana.event.StokpopHelloPerfanaEvent>
                    <myName>myValue</myName>
                    <myCredentials>SECRET</myCredentials>
                </nl.stokpop.perfana.event.StokpopHelloPerfanaEvent>
            </perfanaEventProperties>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>nl.stokpop</groupId>
                <artifactId>perfana-hello-world-events</artifactId>
                <version>1.2.0</version>
            </dependency>
        </dependencies>
</plugin>

Reference JMX files and CSV data

Once you have created your JMeter tests, you'll need to copy them to <Project Dir>/src/test/jmeter. By default this plugin will pick up all the .jmx files in that directory, to specify which tests should be run please see the project documentation.

You can also put data files in this folder and reference them in your plan.

Run the tests

mvn verify

All your tests will run in maven!

Documentation

All the documentation you need to configure the plugin is available on the github wiki.

Beginners should start with the Basic Configuration section.

For advanced POM configuration settings have a look at the Advanced Configuration section.

Books

If you'd like to thank the maintainer of this project and some developers of Apache JMeter, you can buy this book:

Master JMeter book logo

Community

Users Group

A place to discuss usage of the maven-jmeter-plugin, let people know how you use it here.

Homepage: http://groups.google.com/group/maven-jmeter-plugin-users

Group Email: [email protected]

Devs Group

A place to discuss the development of the maven-jmeter-plugin, or ask about features you would like to see added.

Homepage: http://groups.google.com/group/maven-jmeter-plugin-devs

Group Email: [email protected]

Website

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

We love it when people Contribute!

io.perfana

Perfana

Continuous Performance Validation

Versions

Version
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.1
1.0.0