junit: Include output in JUnit report for successful tests and benchmarks

This commit is contained in:
Joël Stemmer
2022-04-01 20:41:31 +01:00
parent a4c479dbbb
commit d2592490b6
12 changed files with 196 additions and 24 deletions

View File

@ -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)