Thursday, 15 December 2016

JMeter Integration with Jenkins





This Integration will reduce the risk of performance degradations whenever you add a new feature or fix a bug on your product. if your latest commit inadvertently causes response times to go above an acceptable threshold or SLA, your CI system will automatically raise a ‘red flag’ and mark the build as ‘failed’. This will make it very easy for you to identify the cause (and the responsible person! :) behind the problem.

 Integrate as below:

Step 1:
Download  and Setup Jenkins https://jenkins-ci.org

Step 2:
To get JMeter support on Jenkins, you need to Download the Performance Plugin
Put performance.hpi  file to Jenkins/Plugin folder.

Step 3:
Add the jmeter.save.saveservice.output_format=xml line to the user.properties file (this is located in /bin folder of your JMeter installation

Step 4:
Run Jenkins as java -jar jenkins.war and wait for the “Jenkins is fully up and running" message.


Open the http://localhost:8080 URL

How to Run a JMeter Test in Jenkins

Step 1:
Create JMeter  Test Plan.
Test has to be run in non-GUI mode.

Step 2:
Add new job in Jenkins Add New Item.

Step 3:
 Add Build Step and select execute Windows batch command.

Step 4:
 Put JMeter Non GUI mode command here.



Step 5:
Add Post Build Action and select Publish Performance Test Result Report.
Put result file name with full path in Report Files field. and SAVE

Step 6: 
Click on Build Now  and see the console output.






No comments:

Post a Comment