mikepenz / action-junit-report

Reports junit test results as GitHub Pull Request Check
https://blog.mikepenz.dev
Apache License 2.0
304 stars 116 forks source link

JUnit task reporting only goes 2 levels deep #1086

Closed KlemenDEV closed 2 months ago

KlemenDEV commented 4 months ago

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 commented 4 months ago

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

mikepenz commented 2 months ago

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

mikepenz commented 2 months ago

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.

KlemenDEV commented 2 months ago

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

KlemenDEV commented 2 months ago

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

mikepenz commented 2 months ago

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

KlemenDEV commented 2 months ago

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

mikepenz commented 2 months ago

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