Option to emit test results in junit format
vaclavHala opened this issue · 1 comments
Hello, it would be quite useful to have some way of outputting test results in some format which is understood by CI servers.
In my experience junit XML format satisfies this quite well.
Is there some way to output like this? (Looking at the code I don't think so but I might've missed something)
Would you accept a PR for this if I provided one?
The way I'd do this would be introducing Reporter object which would replace the displayTestResult
function such that displayTestResult
is called on this object and additionally once the suite is over a new method reportSuiteResult
gets called which it uses to render the accumulated results into a junit.xml report.
The current behavior of the displayTestResult
functions would be retained by wrapping them in a reporter which delegates to the original functions, emitting co console immediately on each displayTestResult
and do nothing in reportSuiteResult
Hi, no at the moment there's no way to output test results in the xml format.
I think this would be a welcomed contribution, so go ahead if you want to work on this.
Note, that ant
and maven surefire
write their results into test results xml file, so the current stdout/stderr output can be retained. I guess we can use maven surefire test report schema as an output schema.