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

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

293 views 1 4
Join discussion

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