mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-04-05 05:00:15 -05:00
junit: Include output in JUnit report for skipped and failed benchmarks
This commit is contained in:
parent
f1ad02b733
commit
d05abd4130
@ -241,10 +241,12 @@ func createTestcaseForBenchmark(pkgName string, bm gtr.Benchmark) Testcase {
|
||||
if bm.Result == gtr.Fail {
|
||||
tc.Failure = &Result{
|
||||
Message: "Failed",
|
||||
Data: formatOutput(bm.Output, 0),
|
||||
}
|
||||
} else if bm.Result == gtr.Skip {
|
||||
tc.Skipped = &Result{
|
||||
Message: "Skipped",
|
||||
Data: formatOutput(bm.Output, 0),
|
||||
}
|
||||
} else if len(bm.Output) > 0 {
|
||||
tc.SystemOut = &Output{Data: formatOutput(bm.Output, 0)}
|
||||
|
6
testdata/036-report.xml
vendored
6
testdata/036-report.xml
vendored
@ -5,13 +5,13 @@
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkError" classname="package/name/benchfail" time="0.000">
|
||||
<failure message="Failed"></failure>
|
||||
<failure message="Failed"><![CDATA[ bench_test.go:6: error message]]></failure>
|
||||
</testcase>
|
||||
<testcase name="BenchmarkFatal" classname="package/name/benchfail" time="0.000">
|
||||
<failure message="Failed"></failure>
|
||||
<failure message="Failed"><![CDATA[ bench_test.go:10: fatal message]]></failure>
|
||||
</testcase>
|
||||
<testcase name="BenchmarkSkip" classname="package/name/benchfail" time="0.000">
|
||||
<skipped message="Skipped"></skipped>
|
||||
<skipped message="Skipped"><![CDATA[ bench_test.go:14: skip message]]></skipped>
|
||||
</testcase>
|
||||
<testcase name="Failure" classname="package/name/benchfail" time="0.000">
|
||||
<error message="Runtime error"><![CDATA[goos: linux
|
||||
|
6
testdata/110-report.xml
vendored
6
testdata/110-report.xml
vendored
@ -5,13 +5,13 @@
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkError" classname="package/name/benchfail" time="0.000">
|
||||
<failure message="Failed"></failure>
|
||||
<failure message="Failed"><![CDATA[ bench_test.go:6: error message]]></failure>
|
||||
</testcase>
|
||||
<testcase name="BenchmarkFatal" classname="package/name/benchfail" time="0.000">
|
||||
<failure message="Failed"></failure>
|
||||
<failure message="Failed"><![CDATA[ bench_test.go:10: fatal message]]></failure>
|
||||
</testcase>
|
||||
<testcase name="BenchmarkSkip" classname="package/name/benchfail" time="0.000">
|
||||
<skipped message="Skipped"></skipped>
|
||||
<skipped message="Skipped"><![CDATA[ bench_test.go:14: skip message]]></skipped>
|
||||
</testcase>
|
||||
<testcase name="Failure" classname="package/name/benchfail" time="0.000">
|
||||
<error message="Runtime error"><![CDATA[goos: linux
|
||||
|
Loading…
x
Reference in New Issue
Block a user