I’ve been using and sharing some thoughts about Taurus and how it enables developers to self drive Integration and Load testing in my previous posts.
Continuous Delivery/Continuous Deployment encourages maximum automation right from infrastructure provisioning thru monitoring so that small batches of code changes can go all the way thru in fastest possible cycle time and provide valuable + timely feedback to the team.
I’m recommending Taurus as an Integration testing tool and ways to reuse some of those Integration test scenarios for Load testing as well using Blazemeter cloud. Have a look at this short post on this. These tests need to run part of delivery pipeline –> post deployment process so that they can stop the build when test fails. To run Taurus tests part, you just need to install “bzt” runner on the deployment agents, ie. on Tfs build agents, if you use Tfs release management or Bamboo agents, if you use Bamboo deployment projects.
But there is a little trick to pass/fail the deployment.
- If your deployment process supports parsing “junit xml” reports, you can directly let it parse the test result.
- If your deployment process doesn’t support parsing “junit xml” reports, workaround is to use the pass/fail criteria from the “bzt” runner itself.
Below code shows how to achieve this. In essence, we use the passfail service and instructing bzt to fail the run, if there is any failure (succ<100%) and stop the execution. In this case bzt will return non-zero exit code (3) and the deployment tool shall use the exit code 3 to fail the test job and stop the build from getting promoted to the next stage.
More detailed documentation is here
This snippet is in github for reference.