mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-04-05 05:00:15 -05:00
junit: Move test output within the XML tag for skipped tests
For consistency with failed tests and tests with unknown status.
This commit is contained in:
parent
1c7fff6728
commit
985100c8e8
@ -170,7 +170,8 @@ func CreateFromReport(report gtr.Report, hostname string) Testsuites {
|
||||
}
|
||||
} else if test.Result == gtr.Skip {
|
||||
tc.Skipped = &Result{
|
||||
Message: formatOutput(test.Output, test.Level),
|
||||
Message: "Skipped",
|
||||
Data: formatOutput(test.Output, test.Level),
|
||||
}
|
||||
} else if test.Result == gtr.Unknown {
|
||||
tc.Error = &Result{
|
||||
|
2
testdata/03-report.xml
vendored
2
testdata/03-report.xml
vendored
@ -5,7 +5,7 @@
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="TestOne" classname="package/name" time="0.020">
|
||||
<skipped message="file_test.go:11: Skip message"></skipped>
|
||||
<skipped message="Skipped"><![CDATA[file_test.go:11: Skip message]]></skipped>
|
||||
</testcase>
|
||||
<testcase name="TestTwo" classname="package/name" time="0.130"></testcase>
|
||||
</testsuite>
|
||||
|
4
testdata/12-report.xml
vendored
4
testdata/12-report.xml
vendored
@ -25,11 +25,11 @@
|
||||
example.go:123: Expected and obtained are different.]]></failure>
|
||||
</testcase>
|
||||
<testcase name="TestFour/#01" classname="package/name" time="0.000">
|
||||
<skipped message="example.go:1234: Not supported yet."></skipped>
|
||||
<skipped message="Skipped"><![CDATA[example.go:1234: Not supported yet.]]></skipped>
|
||||
</testcase>
|
||||
<testcase name="TestFour/#02" classname="package/name" time="0.000"></testcase>
|
||||
<testcase name="TestFive" classname="package/name" time="0.000">
|
||||
<skipped message="example.go:1392: Not supported yet."></skipped>
|
||||
<skipped message="Skipped"><![CDATA[example.go:1392: Not supported yet.]]></skipped>
|
||||
</testcase>
|
||||
<testcase name="TestSix" classname="package/name" time="0.000">
|
||||
<failure message="Failed"><![CDATA[example.go:371: This should not fail!]]></failure>
|
||||
|
Loading…
x
Reference in New Issue
Block a user