michaelleeallen / mocha-junit-reporter

A JUnit XML reporter for mocha.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing attributes for JUnit XML

gileri opened this issue · comments

Hi, thank you for this reporter !

When giving the Junit output to the xUnit Jenkins plugin, it fails with the following error :

WARNING: The file 'junit.xml' is an invalid file.
WARNING: At line 3 of file:junit.xml:cvc-complex-type.4: Attribute 'errors' must appear on element 'testsuite'.
WARNING: At line 3 of file:junit.xml:cvc-complex-type.4: Attribute 'errors' must appear on element 'testsuite'.
WARNING: At line 5 of file:junit.xml:cvc-complex-type.4: Attribute 'errors' must appear on element 'testsuite'.
WARNING: At line 5 of file:junit.xml:cvc-complex-type.4: Attribute 'errors' must appear on element 'testsuite'.
WARNING: The result file 'junit.xml' for the metric 'JUnit' is not valid. The result file has been skipped.

It seems that there is a mismatch between the XSD in mocha-junit-reporter, and the one used by the plugin.

While it's not a fix, I've gotten around this by setting antMode=true in reporterOptions.