mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-04-05 13:08:07 -05:00
Set failure message when a test failed.
The failure tag is required when a test failed. The failure message is set to 'Failed' for now since we don't have the actual failure message yet.
This commit is contained in:
parent
d72fb56d06
commit
c633abbaa9
@ -74,7 +74,7 @@ func JUnitReportXML(report *Report, w io.Writer) error {
|
||||
ts.Failures += 1
|
||||
|
||||
// TODO: set error message
|
||||
testCase.Failure = ""
|
||||
testCase.Failure = "Failed"
|
||||
}
|
||||
|
||||
ts.TestCases = append(ts.TestCases, testCase)
|
||||
|
@ -3,6 +3,8 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase classname="name" name="TestOne" time="0.020"></testcase>
|
||||
<testcase classname="name" name="TestOne" time="0.020">
|
||||
<failure>Failed</failure>
|
||||
</testcase>
|
||||
<testcase classname="name" name="TestTwo" time="0.130"></testcase>
|
||||
</testsuite>
|
||||
|
Loading…
x
Reference in New Issue
Block a user