Bazel's golang test runner uses the normal golang testing runner, but not the actual go test command. Thus, it doesn't include a final test summary line, and go2xunit wasn't able to parse the output without this tweak. Since the xml output would normally end up with a blank name property in this scenario, I've added a -suite-name-prefix commandline option that could be used to supply the missing context.
For what it's worth, my first approach was adding a script wrapper around Bazel's test executions and leaving go2xunit unmodified. I did get that working, but it ended requiring a fairly gross hack. Adding these features to go2xunit was delightfully simple in comparison.
Bazel's golang test runner uses the normal golang testing runner, but not the actual
go test
command. Thus, it doesn't include a final test summary line, and go2xunit wasn't able to parse the output without this tweak. Since the xml output would normally end up with a blankname
property in this scenario, I've added a-suite-name-prefix
commandline option that could be used to supply the missing context.For what it's worth, my first approach was adding a script wrapper around Bazel's test executions and leaving go2xunit unmodified. I did get that working, but it ended requiring a fairly gross hack. Adding these features to go2xunit was delightfully simple in comparison.