From c633abbaa93acffaae0ee86542b0e52ce57bf2af Mon Sep 17 00:00:00 2001 From: Joel Stemmer Date: Fri, 16 Mar 2012 16:13:47 +0100 Subject: [PATCH] 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. --- junit-formatter.go | 2 +- tests/02-report.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/junit-formatter.go b/junit-formatter.go index af43dee..16d6af4 100644 --- a/junit-formatter.go +++ b/junit-formatter.go @@ -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) diff --git a/tests/02-report.xml b/tests/02-report.xml index 151b605..48b40c5 100644 --- a/tests/02-report.xml +++ b/tests/02-report.xml @@ -3,6 +3,8 @@ - + + Failed +