Successful models to run unit tests as part of a deploy?

I notice that all the test components I can use (NUnit parser, JUnit parser, etc) are not available in deploy projects in bamboo.

I'd really love to configure one or more deploy projects so that they deploy, then run unit tests, then the deploy is smart enough to self-rollback if they fail. I know how I could write my script that performs the deploy to do that itself, but it wouldn't exactly be very bamboo-aware. Like, have integration to the point where it would understand that it had to restore the previous successful build. Does anybody have good advice for how to write deploys so that they can run unit tests themselves and self-rollback? Can you share how you configured it to accomplish this task?

1 answer

Why do you need to run unit tests when deploying to different environments since you are testing the same artifact that you would have previously? True unit tests should be environmentally independent and the results should not change as long as the artifact does not change.

Or are these actually environmentally dependent integration tests that are running under a unit testing framework? The second scenario definitely makes sense and could be accomplished using command tasks to both run and parse the unit tests. You can still gate the release based on this, but you would need to rollback to the previous successful build. Someone may know of a way to redeploy the previous artifacts automatically, but I have yet to do so myself.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,073 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot