BlazeMeter provides a plugin which you can connect to Jenkins in order to perform automatic script executions.
This plugin allows you to load test your site with BlazeMeter and the ability to view the report in Jenkins. It also allows you to set the final build status as good, unstable or failed, based on the reported error percentage, and response times.
What is Jenkins?
Jenkins is an open source continuous integration tool written in Java. Builds can be started in various ways. For example: they can be triggered by a commit in a version control system, scheduled via a cron-like mechanism, built when other builds have completed, and by the request of a specific build URL.
How do I install BlazeMeter’s plugin for Jenkins?
- Login to Jenkins and go to the dashboard, Select ‘Manage Jenkins’, then ‘Manage Plugins’ and then, from the top tabs, select ‘Available’. (You can also download BlazeMeter's Plugin to Jenkins)
- Hit 'Ctrl + F' / ‘CMD +F’ in your browser and search for BlazeMeter. Then mark the BlazeMeter check box.
- Scroll down and click ‘Download now and install after restart’.
- After the download starts, click to restart Jenkins.
How do I configure BlazeMeter's plugin for Jenkins?
- Once restarted, click 'Manage Jenkins' and then click Configure System.
- Scroll down to the 'BlazeMeter Cloud' section and enter https://a.blazemeter.com/
- Click Save
- Next, click 'Manage Jenkins' again
- Click 'Manage Credentials'
- Click the 'Add Credentials' button and choose BlazeMeter API Key (You can find it here)
- Add a nickname for your key in the Description field and enter the key in the API Key field and click the Test BlazeMeter User Key button
How do I configure a job using BlazeMeter's Jenkins plugin?
- Click on an existing job or create a new one, then press configure.
- Scroll down to the ‘Build’ steps. Click 'Add Build Step' and choose 'BlazeMeter'.
Setting up the Build's Test
- If your keys were pre-configured correctly in the global settings, you will now see all your tests in the drop down menu 'Blazemeter Test'.
- Select a test to run.
- Save your settings.
- Click on the “Build Now” link and you're ready to run.
Running a BlazeMeter Test in Jenkins Without a Plugin
How do I build a job with BlazeMeter's Jenkins plugin?
- Once inside the job, click 'Build Now'.
- Click the build being run.
- Click console output to see the build progress. You’ll see the test parameters and an update every few seconds.
- When the test finishes, you'll see a summary of the test results and their impact on the build.
You can now click on ‘BlazeMeter Report’ to see a report of the test, the same way you would see them on the site.
You can also edit and compare test results to previous runs.
All logs and data generated during test runs are stored in a ZIP - which you can access directly from your BlazeMeter account, in the 'Logs' tab of a report.
Jenkins’ Reports provide great Out of the Box intelligence and visualization, which are:
Performance Trend Report
The Trend Report presents trends and robustness of the successful and failed test results over time. This report is generated by fetching the JUnit.xml report when a test comes to an end. This capability is inherent to Jenkins and is provided by the common Performance Jenkins plugin.
The Performance report
The Performance report provides a basic KPI/Transactions report that visualize a JTL that is an artifact of the test run. This report is build by fetching the JTL file when a test comes to an end.
Comprehensive Reporting Dashboard
A far more comprehensive reporting dashboard is available, during the test and after the test has ended. By pressing the BlazeMeter link, the BlazeMeter reports are visible providing a deep dive into the performance KPIs, allowing one to look and find performance bottlenecks.
Want to learn more about running performance testing within Jenkins CI? Watch our on-demand recording, How to Scale Test Automation with Jenkins & JMeter.