Is there any way to get Quarantined test info within a Task?

I've got a Bamboo job that parses the JUnit output of a PHPUnit test run, and the exit code from PHPUnit is tied to a short command that notifies GitHub of pass/failure. Pretty straightforward. However, some of those tests are quarantined, so while PHPUnit may return non-zero and then GitHub will be notified of failure, my run may still be green in Bamboo because of quarantined tests.

Is there some way I can get a list or details about quarantined tests from within a Task? It seems like that info is silo'ed inside Bamboo.

1 answer

1 accepted

Hello Collin,

You could probably use Bamboo REST Api ( http://docs.atlassian.com/bamboo/REST/4.2-SNAPSHOT/#idp153216 ) to retrieve information about quarantined tests for a particular result. Not sure if you could poll from the task for the quarantined tests for the latest build result (i.e. exactly that one to which the task execution belongs to), but maybe quarantined tests in the previous build would be good enough for you?

If so, I think you could use some script to gather and process data from something like:

curl -u username:password http://your.bamboo.com:8085/bamboo/rest/api/latest/result/PROJ-PLANKEY-JOBKEY-latest?expand=testResults.quarantinedTests

The response should contain <quarantinedTests> nodes if there was any quarantined failing test.

However, if you can't use that approach then your only option (IMHO) would be to hack a new Task for Bamboo (as a new plugin). In that case please chime in, as I think I have somewhere snippets for retrieving quarantined tests per plan - I could share them with you if necessary.

regards,

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
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,493 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