dorny / test-reporter

Displays test results from popular testing frameworks directly in GitHub
MIT License
826 stars 207 forks source link

Tests/failures/errors/skipped attributes ignored #541

Open geoffday67 opened 4 hours ago

geoffday67 commented 4 hours ago

Describe the bug

Using the JUnit parser, the tests/failures/errors/skipped attributes on <testsuite> are ignored, instead the reported figures are decided by the number of <testcase> sub-elements. In my use case I don't want to add the passed tests to the XML, just the failed ones, but I would like to see the count of tests passed.

To Reproduce

This minimal XML report shows blanks in the Action output:

<testsuites>
  <testsuite name="Wrong data type" tests="1" failures="2" errors="3" skipped="4" time="5">
  </testsuite>
</testsuites>

Expected behavior

The Action report shows the specified counts from the <testsuite> element.

Screenshots

image

Additional context

The XML report is auto-generated by a utility which checks strings for validity and outputs JUnit-compatible format. There are about 2500 strings checked, I don't want to write 2500 <testcase> elements to the XML if possible. I have full access to the source for the utility so I can tweak the output format as needed.

Thanks for any feedback you can give!

jozefizso commented 3 hours ago

You are welcome to create pull request with the fix.