Jenkins & JMeter
Learn how to integrate Apache JMeter performance testing with Jenkins through the Performance Plugin for automated test execution and results capture.
Mark
Performance Testing Expert
Jenkins is the leading open source automation server, providing hundreds of plugins to support building, deploying and automating any project. This article explains how to integrate Apache JMeter performance testing with Jenkins through the Performance Plugin, enabling automated test execution and results capture.
Prerequisites
- Jenkins installation
- Taurus or Apache JMeter
Installing the Performance Plugin
- Navigate to Manage Jenkins
- Select Manage Plugins
- Access the Available Tab
- Search for “Performance” in the filter
- Select the Performance plugin and download
- Restart Jenkins when prompted
Creating a Jenkins Job
Create a new freestyle project called “JMeter” with parameterized builds. Add two string parameters:
| Parameter | Description | Default |
|---|---|---|
| USERS | Number of concurrent users | 1 |
| ITERATIONS | Total iterations to execute | 1 |
Build Configuration
The build step utilizes “Run Performance Test” with Taurus parameters:
execution:
- concurrency: ${USERS}
iterations: ${ITERATIONS}
ramp-up: 1m
scenario: simple
scenarios:
simple:
script: test.jmx
You can customize execution settings including:
- Concurrency (number of virtual users)
- Iterations (total loops)
- Ramp-up timing
Post-Build Actions
Configure the Performance Plugin to publish results:
- Add post-build action “Publish Performance test result report”
- Specify the JTL file location
- Configure thresholds for pass/fail criteria
Further Reading
Tags: