How to Run Taurus with the Jenkins Performance Plugin
The Jenkins Performance Plugin presents graphs that show different KPIs of your tests, enabling you to analyze the results. This is useful when you are running your load tests with Jenkins and you want to have immediate access to some basic info that lets you quickly understand if you need to investigate further. Until now, the plugin supported a limited number of file formats from JMeter, JUnit, Twitter’s Iago and wrk.
But now, the plugin can support more, because the Jenkins Performance Plugin v. 2.1 now supports the Taurus format. This means you can view and analyze results for more open-source testing tools: JMeter, Selenium, Gatling, Grinder, Locust, PBench, Siege, ApacheBenchmark, and Tsung.
Here’s how to do it:
Creating a Test in Taurus
1. Create a Taurus test and inside the config file, enable export results to XML by adding the dump-xml option of the final stats module. You will receive a file that contains Taurus’ final KPIs. This is a file the Jenkins Performance Plugin can consume. For example, your config might be named as “test.yml” and look like this:
Configuring the Test in Jenkins
2. Install the latest version of the Jenkins Performance Plugin (currently 2.1).
3. Make sure you have the latest Taurus version installed on your Jenkins.
4. Create a new Freestyle Project in Jenkins.
5. Configure the job to pick the Taurus config file from the source repository (or any other way to obtain it).
6. Scroll down to build steps and add “Execute Shell” step, then enter the command bzt test.yml -report
Notice the optional -report in the end for running Taurus. If you include -report you will be able to see your test results in the online reporting system as well. If you run -cloud you will be able run the tests from multiple geo-locations through BlazeMeter and also have quick access to those results from Jenkins.
7. Add a post-build action “Publish Performance Test Result Report”.
8. Add -> New Report -> Taurus
9. Put in the filename you used for the Taurus XML file, “stats.xml” in our example above.
10. Save and run the Jenkins job you created.
11. Look to the left pane of Jenkins. You will be able to see the Performance Plugin result links.
12. If you click on the “View External Report” link, you will be able open up the results in your interactive reporting system, e.g. in BlazeMeter.
That’s it! You can now run Taurus scripts using open-source load and functional testing tools, and view results through the Jenkins Performance Plugin. The results can also be viewed in your reporting system, like BlazeMeter.
Learn more about BlazeMeter from this free demo, or try out BlazeMeter instantly by putting your URL or JMX file at the box right here, and your test will start in minutes.