mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-05 13:32:54 -05:00
junit: Include output in JUnit report for successful tests and benchmarks
This commit is contained in:
@ -178,6 +178,8 @@ func CreateFromReport(report gtr.Report, hostname string) Testsuites {
|
||||
Message: "No test result found",
|
||||
Data: formatOutput(test.Output, test.Level),
|
||||
}
|
||||
} else if len(test.Output) > 0 {
|
||||
tc.SystemOut = &Output{Data: formatOutput(test.Output, test.Level)}
|
||||
}
|
||||
|
||||
suite.AddTestcase(tc)
|
||||
@ -198,6 +200,8 @@ func CreateFromReport(report gtr.Report, hostname string) Testsuites {
|
||||
tc.Skipped = &Result{
|
||||
Message: "Skipped",
|
||||
}
|
||||
} else if len(bm.Output) > 0 {
|
||||
tc.SystemOut = &Output{Data: formatOutput(bm.Output, 0)}
|
||||
}
|
||||
|
||||
suite.AddTestcase(tc)
|
||||
|
Reference in New Issue
Block a user