-
Notifications
You must be signed in to change notification settings - Fork 186
TFS reporter does not report flat testsuite structure correctly (failure in Bamboo) #1257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please use TFS reporter |
Does ut_tfs_junit_reporter generate a junit5 based xml format report which can be parsed by Bamboo? |
Hi @EGTBosch |
We will test the reporter to get the report integrated with Bamboo. I have planned to do this in this week. I will let you know. |
It looks like the following XML generated by the TFS Reporter is not accepted by Bamboo, because it complains that it cannot find any test cases in the XML file.
|
I am currenly out of country without access to my laptop. It would be great to have steps to reproduce. I do see a potential problem in your sample report. it is the part: <testsuites>
...
<testsuite tests="14" id="2" package="flow_control.calculate_release_rates.unit_integration_test.uit_adb_fc_crr" errors="0" failures="0" name="ADB_UIT_FlowControl_AUTO" time="14.132688" timestamp="2023-06-15T08:47:33" hostname="VI\SRV03660">
<properties/>
<system-out/>
<system-err/>
</testsuite>
</testsuites> There is a suite with 14 tests reported in it, but it contains zero test cases. |
I am using Bamboo version 8.2.4 build 80210 - 13 Jun 22. The JUnit XML file is generated during the build by the TFC reporter of utplsql (version 3.1.10). The utplsql unit test looks like: `CREATE OR REPLACE PACKAGE uit_adb_fc_crr -- %beforeall -- %beforeeach -- %aftereach -- %afterall -- %context(Product Features) -- %test(ADB_FC_BothTsmZeroCapacity # [00], Both TSM no capacity ) END uit_adb_fc_crr; |
I will rename the issue to: |
@EGTBosch |
@jgebal, Yes, I can update the version easily. I am curious about the fix. |
What is the expectation when the fix will be delivered? |
@EGTBosch can you try this branch ? feature/1257_missing_testcases_tfs_reporter |
@lwasylow, will try to test it in the upcoming weeks. I will let you know the results. |
@lwasylow I have tried the feature/1257_missing_testcases_tfs_reporter and the xml file is indeed generated without the nested testsuite elements which looks ok, but the junit xml file will still not be accepted by the Bamboo JUnit parser task (reason "Failing task since test cases were expected but none were found"). Check the attached file junit_parser_not_successful.txt, but rename into xml file. A junit xml from another project will be accepted by Bamboo, but looks a bit different (see attached file The file generated by the TFS reporter is according to the JUnit xsd, but is not completely valid for Bamboo. |
@EGTBosch hi |
@lwasylow please look at https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd for the XML schema |
Hi @EGTBosch Alternative you can write and plug your own reporter, I believe there is a doc section about that. Cheers Lukasz |
@lwasylow I send you earlier 2 xml files which are both valid against the xml schema used by Bamboo. The xml generated by the TFS reporter (junit_parser_not_successful.txt) is not accepted by Bamboo while the other one (junit_parser_successfully.txt) will be accepted. That is quite strange. You can compare them and see the differences. |
@EGTBosch
|
@lwasylow hmmm, indeed, you are right. It is for me a bit unclear which JUnit format Bamboo is using. In this article JUnit4 as well as JUnit5 is mentioned. The attached file with successful in the name is indeed invalid against the JUnit5 format, but valid against JUnit4. So I think the TFS reporter should generate a JUnit4 xml format (by using the xsd as mentioned in the article). |
Unfortunately we can't modify the tfs reporter as was written with TFS/Azure Devops in mind. Taking your successful xml against it and removing a file attribute from test suite is passing ok validation. However as you mentioned junit4 allows a nested suites which are not allowed in bamboo so that would means bamboo not using junit4, or some modified version. Have you parsed successful xml against junit5 xsd to verify its one that needed? |
@lwasylow, it still not clear what the conclusion is. It seems that Bamboo JUnit parser is not doing XSD validation. The current output of the TFS reporter does not help us. Not sure if we can fix this issue. |
@EGTBosch I'm unfortunately restricted time wise due to work etc.and don't have enough time at the moment to play with Bamboo. |
We generated junit5 files already, removed some attributes, added some other attributes, but still the file is not accepted by Bamboo. Indeed, there is not much information available how Bamboo interprets these junit files. I can wait till you have time to play with Bamboo. |
With the 3.1.10 version it is not possible to integrate JUnit4 reports (with ut_junit_reporter) with Atlassion Bamboo since Bamboo supports only JUnit5 format XML files. The issue is that JUnit5 does not support nested TestSuite elements which is supported by JUnit4. Bamboo is not able to parse JUnit4 report files.
Request to add support for JUnit5 format XML files (make sure ut_junit_reporter can generate JUnit4 XML files).
See below both versions of JUnit with differences (marked in yellow) in TestSuite elements.
JUnit4 (currently generated by ut_junit_reported of utplsql 3.1.10):

JUnit5 (supported by Bamboo):

The text was updated successfully, but these errors were encountered: