Jmeter Integration With Jenkins and Maven Notes
Jmeter Integration With Jenkins and Maven Notes
Jmeter Integration With Jenkins and Maven Notes
Download Maven and set the path in environmental variables and verify with
mvn --version
2) Create a simple maven project
Use the quick start archetype:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>jmeter-demo</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>jmeter-demo</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
5) Create a Jmeter Test and place the jmx file inside jmeter folder
6) Run it in Maven
Go to the project path and run the below command:
mvn install
7) Commit the Maven project to github
Create a repository in your github
Go to directory from command prompt
Do the following
→ $ git init
→ $ git add .
→ $ git commit -m 'First-commit'
Copy the link from your repository
→ $ git remote add origin <remote-repo-link>
→ $ git remote -v
→ $ git push origin master
8) Get Jenkins Running
Running a Jenkins instance locally is very easy. Download the latest Jenkins war
and then run the below command.