Junit XML Parser of bamboo does not separate test cases by their test suites

Junit XML Parser of bamboo does not separate test cases by their test suites while displaying test results on bamboo. Basically all test cases found under XML files are either go to failed test OR successful tests but there is not further categorization by test suites under those two categories. XML results file does have testsuite information why bamboo does not group test cases by test suites. Does anyone have any example XML file which does that. My xml file looks like following which has 2 test passed tests in 2 different test suites.

 

<?xml version="1.0" encoding="UTF-8"?>

<testsuites>

<testsuite hostname="cp-cip3" timestamp="Thu Oct 30 20:42:59 EDT 2014" package="com.olf.cxplugins.test.trayport" time="2000" ignored="0" failures="0" successful="1" tests="1" name="TrayPortSuite2">

<testcase time="32.735" name="tpCommPhysGasNBPPrompt" classname="com.olf.cxplugins.test.trayport.TPCommPhysGasNBPPrompt">

</testcase>

</testsuite>

 <testsuite hostname="cp-cip3" timestamp="Thu Oct 30 20:42:59 EDT 2014" package="com.olf.cxplugins.test.trayport.test" time="2000" ignored="0" failures="0" successful="1" tests="1" name="TrayportSuite">

<testcase time="135.782" name="tpDeleteDeals" classname="com.olf.cxplugins.test.trayport.test.TPDeleteDeals">

</testcase>

</testsuite>

 </testsuites>

<?xml

2 answers

You are right .. the bamboo xslt transform template ignores the testsuites. 

 

this is what bamboo thoughts the xml is and transforms that accordingly. ignoring multiple testsuite to group test case as if there were just one testsuite.

<testsuite>

<testcase>

</testcase>

</testsuite>

 

If you want to generate different report than t he one junit task generates in bamboo you might have to write your own plugin. 

or you can generate a report using own xslt transformation but bamboo won't be maintaining that as the test cases but you will have a artifact report that has better details. 

 

If you want to try custom report: use the following

http://sourceforge.net/p/junitstylexmltestviewer/code/ci/master/tree/

0 votes

Yeah, we're flattening the structure. I think it would only matter to distinguish between testsuites if you were running the same tests in each of them but testsuite would provide different runtime conditions/input values.

Is this your case?

We use test suites to organize tests by category, GUI, DataLayer and so on. Once you go above 100 tests the test page gets quite unwieldy. It would be great if the test page in Bamboo grouped tests by the test suites and showed the number of passed / failed / total tests per suite.

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

4,435 views 20 13
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