BlazeMeter provides a plugin for executing automatic load test scripts in Jenkins, an open source continuous integration tool. The plugin is named the "BlazeMeter Plugin" or "BlazeMeter's Jenkins Plugin".
This BlazeMeter-Jenkins plugin allows you to load test your site with BlazeMeter and then to view and analyze the test 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 KPIs.
What is Jenkins?
Jenkins is an open source continuous integration tool written in Java for automating tests. 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, or 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’ and then ‘Manage Plugins’. 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. You will see the URL 'https://a.blazemeter.com'.
- Click Save.
- Click 'Credentials' --> 'System' --> 'Global Credentials (unrestricted)'.
- Click the 'Add Credentials' button and choose the "BlazeMeter Credentials" button. Add your BlazeMeter API Key Id and API Key Secret.
- Add a nickname for your key in the Description field.
- Click the 'Test BlazeMeter credentials' 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'.
How do I set up the Build's test?
- If your keys were pre-configured correctly in the global settings, you will see your Workspaces and tests in two drop down menus.
- Click on the "Workspace ID" menu to choose the Workspace you want to see tests from.
- You will now see all your tests for your chosen Workspace in the drop down menu 'BlazeMeter Test'.
- Select a test to run.
- Now, you can either click 'Save' to save your Jenkins project and then click 'Build Now' to run the test. Or, you can use the plugin's additional configurations and only then save and build. There are a few options:
- 'Download JTL report' checkbox - downloads the JTL report after finishing the test.
- 'Download JUNIT report' - downloads the Junit report after finishing the test.
- 'Advanced' - For setting the path to the JTL and/or the Junit reports (if you checked the checkboxes), or for pushing JMeter properties to the BlazeMeter load test.
How do I run 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 that is running.
- 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 the test report , the same way you would see them on the BlazeMeter 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. Let's take a look at them:
Performance Trend Report
The Trend Report presents information about the 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 provides a basic KPI/Transactions report that visualizes a JTL that is an artifact of the test run. This report is built by fetching the JTL file when a test comes to an end.
Comprehensive Reporting Dashboard
A far more comprehensive reporting dashboard is availabl, 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.
Learn more about running performance testing within Jenkins CI from out free on-demand recording, How to Scale Test Automation with Jenkins & JMeter.