Closed sbulman closed 7 years ago
Hi @sbulman!
This makes totally sense. I will have a look at this. But the question is, what will be the default behavior?
Perhaps the default behavior should be 'as is' - i.e. the plugin swallows the output from go test. A couple of options could be added:
I'm not sure if it would be possible to allow both options or if they are mutually exclusive. I'm also not sure if for (2) whether go-junit-report can be 'installed' automatically or whether this has to be defined as an explicit dependency in the gradle.build file (either would be fine from my perspective).
Thanks for taking a look.
I'm interested in the junit output as well. I'm still quite new to using this plugin, so I'll likely have more feedback after using it in a bit more complete project. However it would be great to just be able to leverage the test reports config (that is built into gradle):
As mentioned here:
test {
reports {
junitXml.enabled = true
}
}
Storing of the test output and generating of junit-report is now enabled by default and could be configured under:
golang {
testing {
// Will write the test output in the specified file.
// If set to null this file will not be written.
log = "${buildDir}/testing/test.log" // String
// Will write the test output in JUnit report format in the specified file.
// If set to null this file will not be written.
junitReport = "${buildDir}/testing/junit_report.xml" // String
}
}
It would great to add an option to be able to write the test results out in junit format. This is a fairly common format for CI systems. Perhaps at a minimum an option could be added to stream the output of go test into a file that could subsequently be used as input into other tools e.g. https://github.com/jstemmer/go-junit-report