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

  1. Login to Bamboo and go to your dashboard. Click on the cog in the top right corner, and choose ‘Overview’.

    admin overview

  2. Scroll down to the Add-ons section on the left-hand side, and select ‘Find new add-ons.’

    find new addons

  3. In the search bar, search for BlazeMeter. You should see the ‘BlazeMeter test trigger’ pop up.

    test trigger install

  4. Click the Install button to install the BlazeMeter plugin.

How to configure BlazeMeter’s plugin for Bamboo

  1. Once installed, click the cog in the upper right-hand corner and select ‘Overview.’

    admin overview

  2. On the left-hand side of the screen, you will see a section ‘BlazeMeter Administration’ is now present. Click on the ‘Settings page’.

    admin settings

  3. 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.

    api key

Troubleshooting Bamboo BlazeMeter plugin

If the BlazeMeter plugin is having issues installing, try the following steps to resolve the issue.

  1. Stop Bamboo.
  2. 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
  3. 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).
  4. Copy the downloaded *.jar from Step 2 to this location.
  5. Start Bamboo.

How to configure a job using BlazeMeter’s Bamboo plugin

  1. Edit an existing plan or create a new one, then click on a stage.
  2. Click the ‘Add task’ button, under the ‘Tasks’ tab.

    add tasks button

  3. Search for BlazeMeter, or look for BlazeMeter Test and click it.

    task types

Setting up the Plan’s Test

  1. 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.’

    blazemeter tests

  2. Select a test to run.
  3. 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.
  4. "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
  5. Save your settings.
  6. 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.

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

  1. Once inside your plan, click the ‘Run’ drop down and click ‘Run Plan’
  2. 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.

    running build

  3. 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.

    link to report

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"}]
If you have two BlazeMeter steps in one plan, and the first was 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 123with 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