jstemmer / go-junit-report

Convert Go test output to JUnit XML
MIT License
763 stars 222 forks source link

False error report in case of json parsing #165

Closed burgesQ closed 1 year ago

burgesQ commented 1 year ago

Hi,

I've got an internal project, where for the CI I've hooked go test -v -json | go-junit-report -out report.xml -iocopy | gotestfmt.

I've noticed that adding the -parser gojson produce some report.xml that contain inconsistent errors report! Running it multiple time generate different reports. Note that std output / parsing never report any failure.

Strangely enough, all errors are pretty much the same "xml wise" :

</testcase>
<testcase name="[some valid test name]" classname="[some INVALID package name for the given test]" time="0.000">
  <error message="No test result found">
    <![CDATA[! [test logging content] ]]>
  </error>
</testcase>

Any idea about what I may doing wrong ? Thanks 🙏🏻

burgesQ commented 1 year ago

Hum never mind, found my answers here: https://github.com/jstemmer/go-junit-report/issues/134