TL;DR When running JUnit Jupiter parameterized tests, we would like the display name, not the indexed method name (i.e. "testMethod[1]"), to appear in the results on the "Tests" tab.We are using GoCD to run API tests against our compiled product. These are implemented as a series of JUnit Jupiter Parameterized tests, each of which runs with several hundred inputs. To give more descriptive names than "testTheAPI[1...235]", we modify the DisplayName of each test method based on the input. This approach works fine in the Eclipse IDE and from the command line. However, the JUnit XML results that GoCD is processing do not populate the "name" attribute of the "test-case" element with this value, so GoCD is still displaying "testTheApi[1]" etc. on the "Tests" tab. The DisplayName IS included in the result XML, it is just NOT in the attribute the UnitTestReportGenerator expects. Short of either rewriting the reports from JUnit 5 or modifying and patching unittests.xsl, is there any way around this?
--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/9aed64b7-16d8-42d6-8775-c68fc338b4b5n%40googlegroups.com.
Which tool are you using to generate the "JUnit XML"? I don't believe there is actually a proper schema for JUnit XML, and that it is a de-facto "standard" that emerged from Ant originally, and then incorporated into Maven/Gradle etc in their own XML report outputs. I am aware of an attempt here to build a schema, but not actually sure which attribute might be used for this, and whether this is also part of some de-facto standard.
Contributions are welcome though - perhaps you can raise a GitHub issue with examples of the JUnit XML, and/or submit a PR alongside some of the research into extensions to the "schema" and any standardisation?
You received this message because you are subscribed to a topic in the Google Groups "go-cd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/go-cd/PqvJrhNTeag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/CAA1RwH9MGfCtx_uCo7wnoYTrO7aLCNwNpbTVnKXjWtiTCx2eGQ%40mail.gmail.com.