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:
Joel Stemmer 2012-03-16 16:13:47 +01:00
parent d72fb56d06
commit c633abbaa9
2 changed files with 4 additions and 2 deletions

View File

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

View File

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