Hello,
I'm trying to use the "Report Test Results" step in VSO on a NodeJS project, but I'm running into a few issues. I'm running my tests via Mocha. I've tried both the built-in xunit reporter and a third party junit reporter. The xunit reporter could not find the 'assemblies' node in the XML, which I'm assuming is an extension of the xunit schema you guys expect for .net projects.
The JUnit reporter creates an empty root suite, which caused an error in TestResultReader.ts, where a suite could not iterate its tests. I was able to work around the empty root suite, but this error also showed up when I had nested mocha structures like this:
Hello, I'm trying to use the "Report Test Results" step in VSO on a NodeJS project, but I'm running into a few issues. I'm running my tests via Mocha. I've tried both the built-in
xunit
reporter and a third party junit reporter. Thexunit
reporter could not find the 'assemblies' node in the XML, which I'm assuming is an extension of the xunit schema you guys expect for .net projects.The JUnit reporter creates an empty root suite, which caused an error in
TestResultReader.ts
, where a suite could not iterate its tests. I was able to work around the empty root suite, but this error also showed up when I had nested mocha structures like this:So, in the end, if a suite doesn't contain any tests, you should just skip it. e.g. wrap this (https://github.com/Microsoft/vso-agent/blob/master/src/agent/testresultreader.ts#L261) with
if (rootNode.testcase) {}
.If I get some time later this week, I'll put together a PR for this issue.