Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

command_tab October 22, 2012

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

0 votes
Answer accepted
PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2012

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
TAGS
AUG Leaders

Atlassian Community Events