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 Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,249 views 21 17
View question

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