BlazeMeter Plugin to Bamboo
What is Bamboo?
Bamboo is a Continuous Integration tool by Atlassian. Bamboo does more than just run builds and tests. It connects issues, commits, test results, and deploys so the whole picture is available to your entire product team – from project managers to devs and testers, to system admins.
The BlazeMeter plug-in to Bamboo allows you to load test your site using BlazeMeter, as part of your Continuous Integration/Delivery(CI/CD) process.
When using the plugin, Bamboo will show a report generated by the BlazeMeter test. and based on the results it will set the final build status as good or failed.
This plug-in Bamboo Server instance as well as remote agents.
- How to Install BlazeMeter’s plugin for Bamboo
- How to configure BlazeMeter’s plugin for Bamboo
- Troubleshooting Bamboo BlazeMeter plugin
- How to configure a job using BlazeMeter’s Bamboo plugin
- Setting up the Plan’s Test
- Reports
- Running a Build with BlazeMeter’s Bamboo Plugin
- Working with proxy server
- Logging
- Changelog
How to Install BlazeMeter’s plugin for Bamboo
- Login to Bamboo and go to your dashboard. Click on the cog in the top right corner, and choose ‘Overview’.
- Scroll down to the Add-ons section on the left-hand side, and select ‘Find new add-ons.’
- In the search bar, search for BlazeMeter. You should see the ‘BlazeMeter test trigger’ pop up.
- Click the Install button to install the BlazeMeter plugin.
How to configure BlazeMeter’s plugin for Bamboo
- Once installed, click the cog in the upper right-hand corner and select ‘Overview.’
- On the left-hand side of the screen, you will see a section ‘BlazeMeter Administration’ is now present. Click on the ‘Settings page’.
- Enter your API key ID and API key secret from your BlazeMeter account (API key ID & API key secret can be found following BlazeMeter API keys guide - BlazeMeter API keys), and in the ‘Server URL’, enter https://a.blazemeter.com and click the Save button.
Troubleshooting Bamboo BlazeMeter plugin
If the BlazeMeter plugin is having issues installing, try the following steps to resolve the issue.
- Stop Bamboo.
- Download the BlazeMeter plugin manually from the Atlassian Marketplace by clicking the ‘Get it now’ button, at this link: https://marketplace.atlassian.com/plugins/com.blazemeter.bamboo.plugin.BlazeMeterBamboo/server/overview
- Go to the plugins folder ($BAMBOO_HOME/plugins or it can be in user-data-dir .atlassian/bamboo/plugins) and remove all BlazeMeter*.jars (if any).
- Copy the downloaded *.jar from Step 2 to this location.
- Start Bamboo.
How to configure a job using BlazeMeter’s Bamboo plugin
- Edit an existing plan or create a new one, then click on a stage.
- Click the ‘Add task’ button, under the ‘Tasks’ tab.
- Search for BlazeMeter, or look for BlazeMeter Test and click it.
Setting up the Plan’s Test
- If your settings were pre-configured correctly in the global settings, you will now see all your tests in the drop-down menu ‘BlazeMeter tests.’
- Select a test to run.
- You can enter session properties in "Send jmeter properties to test" field in the following format: key=value,key1=value1,key2=value2 Sending properties for test session is currently not supported for Taurus & multi tests.
- "Add notes to test report" textarea allows to set notes, which will be visible at test report dashboard after starting the test. Note that Bamboo variables, e.g. ${bamboo.planKey} will be resolved. More information on this is available here
- Save your settings.
- Make sure your plan is enabled, and you are ready to run.
Reports
Plugin downloads two kind of reports after test session was over: junit
& jtl
.
junit
report contains data which is compatible with any junit parserjtl
report contains data in Apache Jmeter jtl format
Download JTL report
& Download Junit report
check-boxes are used for configuring whether or not reports should be downloaded. By default, reports are downloaded to ${BAMBOO_HOME}|${BAMBOO_AGENT_HOME}/xml-data/build-dir<PLAN_ID> - <PROJECT_ID> - <JOB_ID>/<build-number>
User can override this path in task configuration(Path to JTL report
& Path to Junit report
fields) both with absolute and relative paths.
Also Bamboo variables can be used in paths.
Running a Build with BlazeMeter’s Bamboo Plugin
- Once inside your plan, click the ‘Run’ drop down and click ‘Run Plan’
- Once the build begins, it will take you to the following screen, showing you the console, where you can see the progress of your build.
- When the test finishes, you will see a summary of the build. Also you will find the ‘BlazeMeter Test Report’ tab on your build page. It contains the link to the BlazeMeter report page.
Working with proxy server
Set up proxy on Atlassian Bamboo server;
Add to $BAMBOO_HOME/conf/catalina.properties the following:
http.proxyHost=<IP>
http.proxyPort=<PORT>
http.proxyUser=<USER>
http.proxyPass=<PASSWORD>
Set up proxy on Atlassian Bamboo remote agent:
Open ${BAMBOO_REMOTE_AGENT_HOME}/conf/wrapper.conf
Add the following entries to it:
wrapper.java.additional.3=-Dhttp.proxyHost=<proxyIP>
wrapper.java.additional.4=-Dhttp.proxyPort=<proxyPort>
wrapper.java.additional.5=-Dhttp.proxyUser=<proxyName>
wrapper.java.additional.6=-Dhttp.proxyPass=<proxyPass>
wrapper.java.additional.7=-Dhttp.nonProxyHosts=<AtlassianBambooServerHost>
Pass/Fail build criteria
Plugin is using /ci-status
request for setting build result. Depending on this request, plugin sets one of the available in Bamboo build result:
SUCCESS
This status is set in next cases:
- test has no thresholds;
- test has thresholds and they were not violated;
- there were no errors in
ci-status
response;
ERROR
- test was completed successfully, but there were errors in
/ci-status
response;
FAILED
- test has thresholds and they were violated;
- Bamboo job got error on
/test/start
request; - test has no thresholds, but there were specific errors in
/ci-status
response:"errors":[{"code": 70404,"message": "Session ended without load report data","details": null}]
"errors":[{"code":0,"Message":"Not enough resources"}]
SUCCESS
and the second was FAILED
, then the whole build is marked as FAILED
. If the first was FAILED
then, by default, the second won't be executed. You can move it to Final Tasks
in the Job Configuration
to make Bamboo execute it in this case.Logging
Plugin has separate log file, which can simplify debugging process in case of any issues with running test.
http-log
- contains plugin - BlazeMeter server communication.
It's located in ($BAMBOO_HOME
/$BAMBOO_AGENT_HOME
)xml-data/build-dir/<PLAN_ID> - <PROJECT_ID> - <JOB_ID>/build # <buildId>/http-log
If build was interrupted at the Bamboo server side, log will be available using link <server-host>/browse/<PLAN_ID> - <PROJECT_ID>-<JOB_ID>-<BUILD_ID>/log
E.g. if you have plan 123
with project 234
with single job inside it, than log link will be <server-host>/browse/123-234-JOB1-<BUILD_ID>/log
Changelog
https://github.com/Blazemeter/blazemeter-bamboo-plugin/blob/master/Changelog.md