codecov / feedback

A place to discuss feedback about the pull request and web product experience.
36 stars 7 forks source link

JUnit XML report fails to process #543

Open Blacksmoke16 opened 3 weeks ago

Blacksmoke16 commented 3 weeks ago

Describe the bug

junit.xml report files are not processing correctly in regards to https://docs.codecov.com/docs/test-result-ingestion-beta. Example: https://github.com/athena-framework/athena/pull/452#issuecomment-2383121916

❌ We are unable to process any of the uploaded JUnit XML files. Please ensure your files are in the right format.

The related CI job does find the reports, so they are being uploaded correctly.

Based on what I read in https://docs.codecov.com/docs/test-result-ingestion-beta#troubleshooting. I'm pretty sure this is because codecov is expecting the outer most testsuites tag, and possibly the name attribute. Whereas my junit.xml file looks like:

<?xml version="1.0"?>
<testsuite tests="4" skipped="0" errors="0" failures="0" time="0.005031332" timestamp="2024-09-29T19:55:54Z" hostname="theStone">
  <testcase file="/home/george/dev/git/athena-framework/athena/src/components/negotiation/spec/base_accept_spec.cr" classname="src.components.negotiation.spec.base_accept_spec" name="BaseAcceptTest parse parameters 3" line="18" time="6.2057e-5"/>
  <testcase file="/home/george/dev/git/athena-framework/athena/src/components/negotiation/spec/base_accept_spec.cr" classname="src.components.negotiation.spec.base_accept_spec" name="BaseAcceptTest parse parameters 1" line="18" time="4.9572e-5"/>
  <testcase file="/home/george/dev/git/athena-framework/athena/src/components/negotiation/spec/base_accept_spec.cr" classname="src.components.negotiation.spec.base_accept_spec" name="BaseAcceptTest parse parameters 0" line="18" time="6.358e-6"/>
  <testcase file="/home/george/dev/git/athena-framework/athena/src/components/negotiation/spec/base_accept_spec.cr" classname="src.components.negotiation.spec.base_accept_spec" name="BaseAcceptTest build parameters string 0" line="7" time="3.832e-6"/>
</testsuite>

Expected behavior

It would be ideal if it was able to process this variant of junit.xml to allow things to just work out of the box with Crystal. Or at least, expose more information on what the exact problem is.

Additional context

rohan-at-sentry commented 6 days ago

@Blacksmoke16 whoops I totally missed that you raised this. I'll get this looked at asap