*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 
<https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/domain/UnitTestReportGenerator.java>
 expects. 
Short of either rewriting the reports from JUnit 5 or modifying and 
patching unittests.xsl 
<https://github.com/gocd/gocd/blob/master/common/src/main/resources/com/thoughtworks/go/domain/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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/9aed64b7-16d8-42d6-8775-c68fc338b4b5n%40googlegroups.com.

Reply via email to