Jenkins & JMeter

Jenkins is a the leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project.

As part of automation you can install many plugins, one of which is the Performance Plugin. This allows Apache JMeter to run within Jenkins and capture it’s output and results.

PRE-REQS

Jenkins

Taurus / Apache JMeter

PERFORMANCE PLUGIN

The performance plugin is an addition to the base build of Jenkins. To install it follow the steps below:-

Click Manage Jenkins

Click Manage Plugins

Click Available Tab

Type “Performance” in the Filter bar

Click on the “Performance” radio box and click Download now and install after restart

Click the “Restart Jenkins when installation is complete and no jobs are running” .

Once restarted login back into Jenkins.

JENKINS JOB

Inside Jenkins we will need to create a new job.

Click on New Items

Enter an Item Name e.g. “JMeter”, click Freestyle project and then click OK.

Click on the radio box for This project is parameterized

Add string parameter 1

String Parameter

Name = USERS

Default Value = 1

Description = Number of users

Add string parameter 2

String Parameter

Name = ITERATIONS

Default Value = 1

Description = Total number of iterations

Under build tab add build step Run Performance Test and Taurus parameters

$SCRIPT_PATH -o execution.0.concurrency=$USERS -o execution.0.iterations=$ITERATIONS -o execution.0.ramp-up=$RAMPUP -o modules.blazemeter.token=$API_KEY:$API_SECRET -o modules.blazemeter.project=$PROJECT_NAME -o modules.blazemeter.test=$TEST_NAME -report

Save and Execute

Click Save and build with parameters

Enter your parameter values and click build

The build will start and your test will execute.

FURTHER READING

Taurus

Jenkins

Previous
Previous

JMeter JTL Files

Next
Next

JMeter Backend Listeners