Shreya Goyal

Automating JMETER Scripts With MAVEN and JENKINS

Before starting with the integration of Jmeter scripts with Mvn and Jenkins we should know what is a jmeter, jenkins and maven.

What is jmeter?

Jmeter is an Open Source performance testing tool . It is 100% Java application. It is designed to cover categories of tests like load, functional, performance, regression, etc.,

Whats is jenkins?

Jenkins is an open source continuous integration (CI) tool written in Java. It provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat.

What is maven?

Maven is a build automation tool used primarily for Java projects. Maven addresses two aspects of building software: First, it describes how software is built, and second, it describes its dependencies.

Step by Step to integrate Jmeter(Performance Tool) with Maven build.

Step 1:

You should be having jmeter test .jmx file and that test must be placed in the folder /src/test/jmeter

Step 2:

Create a POM file and place it along with /src folder.

Below is an Example of a POM.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">


Step 3:

The Maven properties are passed to JMeter via the userProperties option. Inside a JMeter test, you can then access the properties using the function ${__P(propertyName)}.

Eg: <stringProp name=”LoopController.loops”>${__P(Loopcount,3)}</stringProp>

Step 4:

To run jmeter test through maven, use below command in command prompt

mvn -DJmeterTestFile=Click_link_through -DRampUp=10 -DLoopcount=2 -DThreadcount=3 verify

Step 5:

Jenkins Configurations

Jenkins provides the great “Performance” plugin (https://wiki.jenkins- for reporting JMeter results.


jmeter performance report

jmeter performance report



running the test …

running the test …










The build overview page shows the trends for throughput, error rates and response timings for all JMeter tests.

response timings for all JMeter tests











The Performance Report shows some more details and detailed numbers for each test

more details and detailed numbers for each test











And of course you can drill down to every single test plan.