{"action":"created","issue":{"url":"https://api.github.com/repos/kmiyashiro/grunt-mocha/issues/141","labels_url":"https://api.github.com/repos/kmiyashiro/grunt-mocha/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/kmiyashiro/grunt-mocha/issues/141/comments","events_url":"https://api.github.com/repos/kmiyashiro/grunt-mocha/issues/141/events","html_url":"https://github.com/kmiyashiro/grunt-mocha/issues/141","id":57289682,"number":141,"title":"XUnit: invalid XML if running multiple suites","user":{"login":"givankin","id":530605,"avatar_url":"https://avatars.githubusercontent.com/u/530605?v=3","gravatar_id":"","url":"https://api.github.com/users/givankin","html_url":"https://github.com/givankin","followers_url":"https://api.github.com/users/givankin/followers","following_url":"https://api.github.com/users/givankin/following{/other_user}","gists_url":"https://api.github.com/users/givankin/gists{/gist_id}","starred_url":"https://api.github.com/users/givankin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/givankin/subscriptions","organizations_url":"https://api.github.com/users/givankin/orgs","repos_url":"https://api.github.com/users/givankin/repos","events_url":"https://api.github.com/users/givankin/events{/privacy}","received_events_url":"https://api.github.com/users/givankin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-11T08:47:09Z","updated_at":"2015-10-16T06:18:50Z","closed_at":null,"body":"Hi,\r\nthe resulting XML for multiple suites is\r\n````\r\n<testsuite>...</testsuite>\r\n<testsuite>...</testsuite>\r\n````\r\nWhich is invalid XML (can't be parsed by Jenkins e.g.). According to XUnit Spec, it has to be:\r\n````\r\n<testsuites>\r\n  <testsuite>...</testsuite>\r\n  <testsuite>...</testsuite>\r\n<testsuites>\r\n````\r\nFrom 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.\r\nI 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>`.\r\n"},"comment":{"url":"https://api.github.com/repos/kmiyashiro/grunt-mocha/issues/comments/148624592","html_url":"https://github.com/kmiyashiro/grunt-mocha/issues/141#issuecomment-148624592","issue_url":"https://api.github.com/repos/kmiyashiro/grunt-mocha/issues/141","id":148624592,"user":{"login":"shwangste","id":11920660,"avatar_url":"https://avatars.githubusercontent.com/u/11920660?v=3","gravatar_id":"","url":"https://api.github.com/users/shwangste","html_url":"https://github.com/shwangste","followers_url":"https://api.github.com/users/shwangste/followers","following_url":"https://api.github.com/users/shwangste/following{/other_user}","gists_url":"https://api.github.com/users/shwangste/gists{/gist_id}","starred_url":"https://api.github.com/users/shwangste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shwangste/subscriptions","organizations_url":"https://api.github.com/users/shwangste/orgs","repos_url":"https://api.github.com/users/shwangste/repos","events_url":"https://api.github.com/users/shwangste/events{/privacy}","received_events_url":"https://api.github.com/users/shwangste/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T06:18:50Z","updated_at":"2015-10-16T06:18:50Z","body":"+1"}}