It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use a test task in a deployment project

Carolyn Van Slyck Jan 30, 2014

As part of the deployment to a test environment, I need to run some integration tests that my QA team has defined as critical for evaluating the success of a deployment. If the tests don't pass, then the deployment should be marked as failed.

While I could run nunit-console.exe in a script task and figure out how to publish the result file somewhere... I would prefer to use the same Nunit task that is available in a build plan and have the test results published with the deployment. Is that possible?

7 answers

1 vote
VikasB Jul 19, 2016

You can use Cucumber For Bamboo plugin. This plugin adds Cucumber parsers in Build as well ad Deployment plans. It provides options to pass or fail build if any test is failed or based on failure threshold or can just print test results in Log without affecting deployment status.
The plugin also adds new UI elements to display deployment tests, Cucumbers results and pie chart of tests. It also has features to automatically link tests with JIRA issues.
https://marketplace.atlassian.com/plugins/com.mdb.plugins.cucumberforbamboo/server/overview

0 votes
Carolyn Van Slyck Feb 05, 2014

Am I going about this backwards? It seems like the first thing anyone would want to do after deploying to an environment is to run a few checks to make sure it was successful. What am I missing?

0 votes
Jason Monsorno Feb 05, 2014

Strictly speaking on unit tests, they should be atomic or near-atomic operations that don't talk to other services etc and should not rely on a specific environment except for maybe minimum spec requirements (processor, memory) but within your own setup that should already be established so that would be a bit backwards thinking to run after deployment. Smoke, performance, or end-to-end testing could definitely make sense to run against a site with a fresh deployment. We have about a 50/50 mix of that inside of nunit tests so nunit alone wouldn't cover everything in my case. I'm in process now of setting up additional plans to run them nightly; the reason I decided to step them out into their own plans was to utilize the Bamboo statistics and charting. With nightly/daily runs I can chart the "build time" of each plan per day which is perfect for our performance testing.

0 votes
Carolyn Van Slyck Feb 05, 2014

I am running my unit tests in the build plan.

But, like you, my integration tests which I would like to run on a new deployment use NUnit. It doesn't really fit into how we would like to use deployments to have to kick off a seperate build plan just to test a deployment and then somehow train people to hunt down the status of that build plan to know the status of a deployment. The tests rightfully belong with the deployment and their results should be displayed on the deployment status page.

0 votes
Jason Monsorno Feb 05, 2014

I completely agree, but the nunit runner doesn't implement DeploymentTaskRequirementSupport. You could recode the DotNet plugin to do so though.

0 votes
Carolyn Van Slyck Feb 06, 2014

Yeah that seems to be the only way. Hopefully a later version of Bamboo has it built in but for now a custom task will get us by.

Thanks!

0 votes
VikasB Aug 26, 2016
Plan runners add on adds task to run integration tests build plan from deployment and pass or fail the deployment based on tests status

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

7,852 views 23 36
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you