You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
From looking at code, I see the reason as this: as suites run one by one in a loop, reporter doesn't "know" anything about other suites and always acts as if there was a single suite - then the (valid) results for each suite are just concatenated.
I would be glad to submit a PR, but I even don't know where to start because from the point of view of the reporter it works as expected. In my Gruntfile I currently just use fs to wrap final XML it <testsuites>.
The text was updated successfully, but these errors were encountered:
Is wrapping the output in <testsuites> actually what the XUnit spec declares? I don't use XUnit so I'm not sure if adding this wrapper will break whatever consumes the output for those that are running single suites.
Just in case, if anybody is interested, here's what I use for Grunt:
grunt.registerTask('fixXunitXml', function () {
var fs = require('fs'),
path = 'report/xunit.xml',
xml = fs.readFileSync(path, 'utf8');
xml = '<testsuites>' + xml + '</testsuites>';
fs.writeFileSync(path, xml);
});
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
the resulting XML for multiple suites is
Which is invalid XML (can't be parsed by Jenkins e.g.). According to XUnit Spec, it has to be:
From looking at code, I see the reason as this: as suites run one by one in a loop, reporter doesn't "know" anything about other suites and always acts as if there was a single suite - then the (valid) results for each suite are just concatenated.
I would be glad to submit a PR, but I even don't know where to start because from the point of view of the reporter it works as expected. In my Gruntfile I currently just use
fs
to wrap final XML it<testsuites>
.The text was updated successfully, but these errors were encountered: