kulya / jmeter-gradle-plugin

Other
40 stars 27 forks source link

This is JMeter plugin for Gradle build system. This plugin enables running JMeter test using Gradle.

USAGE

1) Create a build.gradle file in the root directory of the project, and include the JMeter plugin as follows: If you use plugin version before 1.3.1 please use next code to setup project

apply plugin: 'jmeter'

buildscript {
    repositories {
        maven {
            url "http://repo.kulya.info/content/groups/public/"
        }
    }
    dependencies {
        classpath "org.veil.gradle.plugins:jmeter-gradle-plugin:1.2-2.6"
    }
}

If it is 1.3.1 and above

apply plugin: 'jmeter'

    buildscript {
        repositories {
            mavenCentral()
        }
        dependencies {
            classpath "com.github.kulya:jmeter-gradle-plugin:1.3.1-2.6"
        }
    }

2) Tune JMeter plugin to match your sources directory i.e.:

jmeterRun.configure {
    jmeterTestFiles = [file("src/test/jmeter/test1.jmx"), file("src/test/jmeter/test2.jmx"), file("src/test/jmeter/test3.jmx")]
}

3) With this plugin you can specify next JMeter properties:

4) To run JMeter test execute

gradle jmeterRun

At project directory

5) To run JMeter gui execute

gradle jmeterEditor

At project directory

6) To clean the reports

gradle jmeterCleanReport

7) To List all the testPlan

gradle jmeterListTestPlan