action-junit-report icon indicating copy to clipboard operation
action-junit-report copied to clipboard

JUnit task reporting only goes 2 levels deep

Open KlemenDEV opened this issue 1 year ago • 1 comments

If JUnit tests are nested more than 2 levels (e.g. https://www.baeldung.com/junit-5-nested-test-classes), only first and last test names are printed, excluding all level names in between on the summary page. This makes it hard to read summary page in those cases as important information is lost

KlemenDEV avatar May 05 '24 09:05 KlemenDEV

Example of such report: https://github.com/MCreator/MCreator/actions/runs/8957007479

Example of >2 deep nesting: https://github.com/MCreator/MCreator/actions/runs/8957007479/job/24599538540#step:5:1303

KlemenDEV avatar May 05 '24 09:05 KlemenDEV

Sorry for the late response. can you please attach an example XML which can be used for testing / investigation?

mikepenz avatar Jun 21 '24 09:06 mikepenz

Not sure if the latest changes enable what you need. However the latest main branch includes updates to the check_title_template adding a new BREAD_CRUMB template, you can use to construct a title which should have the full path.

mikepenz avatar Jun 21 '24 15:06 mikepenz

Ok, I will test it when I get time to look into it. Thanks!

KlemenDEV avatar Jun 21 '24 15:06 KlemenDEV

https://github.com/MCreator/MCreator/actions/runs/9616678764

Does not seem to fix.

In our case it seems {{BREAD_CRUMB}} is empty based on linked report

Config: https://github.com/MCreator/MCreator/pull/4901/files#diff-faff1af3d8ff408964a57b2e475f69a6b7c7b71c9978cccc8f471798caac2c88

KlemenDEV avatar Jun 22 '24 09:06 KlemenDEV

Can you please provide the junit XML output you pass on to the action. This should allow me to have a much closer look at what's the case in this situation

mikepenz avatar Jun 22 '24 09:06 mikepenz

Aha, I see, the problem is on Gradle level because it is not even including information about this in the XML. No need to attach XML as this is not actually a problem of this action.

Probably this: https://github.com/gradle/gradle/issues/17384

IDEA seems to handle this OK, though (line marked with green arrow is not included in Gradle XML test report):

image

Sample XML:

TEST-net.mcreator.integration.generator.GeneratorsTest.zip

KlemenDEV avatar Jun 22 '24 10:06 KlemenDEV

Thank you for the update. Given that the xml output already does not include this information. I believe we can close this issue.

mikepenz avatar Jun 23 '24 06:06 mikepenz