jaikiran commented on issue #121: use displayName instead of legacyReportingName in xml reports URL: https://github.com/apache/ant/pull/121#issuecomment-585021713 Hello @mguillem, sorry to keep you waiting and thank you for the patience. Here's more details on why I used `legacyReportingName` when I fixed https://bz.apache.org/bugzilla/show_bug.cgi?id=63680 and why the current proposed change can cause issues. Please consider the following testcase: ``` package org.myapp; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import org.junit.jupiter.api.RepeatedTest; public class SimpleTest { @ParameterizedTest @ValueSource(strings = { "one", "two", "three" }) public void testIt(String name) throws Exception { System.err.println(name); } @RepeatedTest(value = 3) public void testRep() { System.err.println("hello"); } @RepeatedTest(value = 3) public void testRep2() { System.err.println("hello2"); } } ``` Currently in Ant 1.10.7 (which has that fix for bz-63680), where the legacy reporting name gets used, the generated XML report is of the form: ``` <testcase classname="org.myapp.SimpleTest" name="testIt(String)[3]" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="testIt(String)[2]" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="testRep2()[2]" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="testRep2()[1]" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="testRep()[2]" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="testRep()[1]" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="testRep()[3]" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="testRep2()[3]" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="testIt(String)[1]" time="0.028"></testcase> ``` and the HTML looks like this image https://home.apache.org/~jaikiran/ant-1.10.7.png Now with the proposed change in this PR, the generated XML report looks like: ``` <testcase classname="org.myapp.SimpleTest" name="[3] three" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="[2] two" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="repetition 2 of 3" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="repetition 1 of 3" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="repetition 2 of 3" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="repetition 1 of 3" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="repetition 3 of 3" time="0.001"></testcase><testcase classname="org.myapp.SimpleTest" name="repetition 3 of 3" time="0.0"></testcase><testcase classname="org.myapp.SimpleTest" name="[1] one" time="0.021"></testcase> ``` and the report HTML looks like https://home.apache.org/~jaikiran/proposed-change.png Notice that the names no longer contain the method names and have completely lost context of which method is being repeat tested or parameterized. The version in 1.10.7 has the necessary information about the methods being parameterized as well as repeated, so I believe we should continue to use the way it is in 1.10.7.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org