Summary
Bamboo test results show unexpected results when testcase classpath is null
Steps to Reproduce
- Create a build that parses the following test file
<testsuite errors="0" failures="0" name="name" skips="0" tests="2" time="0.2"> <testcase classname="classname" file="file" line="1" name="test_class" time="0.1"/> <testcase classname="" file="test" line="1" name="test_class" time="0.1"/> </testsuite>
- Run the build and check the results
Expected Results
Bamboo will show the two tests as expected in <Bamboo_URL>/browse/PLAN-KEY-XXX/test and <Bamboo_URL>/browse/PLAN-KEY-XXX/test/case/0 .
Actual Results
The page <Bamboo_URL>/browse/PLAN-KEY-XXX/test will not show the correct total number for tests:
The page <Bamboo_URL>/browse/PLAN-KEY-XXX/test/case/0 will show an unespected error:
- relates to
-
BAM-17820 JUnit testuite with no name will not be displayed in the UI
-
- Closed
-
This issue was resolved by adding a default name for test cases with no class name.
If you use an earlier Bamboo version, you can work around this issue by adding a "fake" class name to your JUnit results in the classname parameter of the testcase tag.
For example, this could be done in a Script task just before the parser, containing:
sed -i 's/classname=""/classname="no name"/' *.xml