Is it possible to treat a build with test failures as passing?

Cruise Control only considered a build as failed when Ant exited non-zero, even if there were test failures. Is it possible to get the same behavior from Bamboo?

3 answers

1 accepted

There is a https://jira.atlassian.com/browse/BAM-1278 issue raised for treating arbitrary test failures as 'passed', making the Bamboo completing the builds. Not exactly what you need, but it still might be valuable to add yourself as a watcher to that issue.

cheers,

Actually it is - now I know that I can't do what I want exactly. Instead I think I will change my script to just remove known failures. It's not ideal but I'll leave the original file around somewhere so I can at least see what's still failing.

If you remove the JUnit parsing task (or whatever test results parsing task you use) then Bamboo will only consider the exit code when deciding whether a plan passes/fails. If you need the test parsing task then you will want to look at modifying your test runner to ignore certain test failures.

How do I do that? I just added an Ant task and checked off the "The build will produce test results" checkbox.

Note that I would still like to see the test results on the build page. I considered disabling the plugin but I don't think that will work.

If I understand correctly (I don't have any experience with Ant), all checking the "This build will produce test results" option is fail the test if no tests are found. But it is still up to that final, JUnit parsing task to actually looking for test failures. If it were me, I would modify the test runner (again, no Ant experience so I don't know how this is done) to take a list of tests to run, but always report that they were successful.

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

446 views 2 5
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