diff --git a/pkg/junit/junit.go b/pkg/junit/junit.go
index c9a045c..87fb732 100644
--- a/pkg/junit/junit.go
+++ b/pkg/junit/junit.go
@@ -50,8 +50,8 @@ type Testsuite struct {
Properties []Property `xml:"properties>property,omitempty"`
Testcases []Testcase `xml:"testcase,omitempty"`
- SystemOut string `xml:"system-out,omitempty"`
- SystemErr string `xml:"system-err,omitempty"`
+ SystemOut *Output `xml:"system-out,omitempty"`
+ SystemErr *Output `xml:"system-err,omitempty"`
}
func (t *Testsuite) AddProperty(name, value string) {
@@ -92,8 +92,8 @@ type Testcase struct {
Skipped *Result `xml:"skipped,omitempty"`
Error *Result `xml:"error,omitempty"`
Failure *Result `xml:"failure,omitempty"`
- SystemOut string `xml:"system-out,omitempty"`
- SystemErr string `xml:"system-err,omitempty"`
+ SystemOut *Output `xml:"system-out,omitempty"`
+ SystemErr *Output `xml:"system-err,omitempty"`
}
// Property represents a key/value pair.
@@ -109,6 +109,11 @@ type Result struct {
Data string `xml:",cdata"`
}
+// Output represents output written to stdout or sderr.
+type Output struct {
+ Data string `xml:",cdata"`
+}
+
// FormatDuration returns the JUnit string representation of the given
// duration.
func FormatDuration(d time.Duration) string {
diff --git a/pkg/junit/junit_test.go b/pkg/junit/junit_test.go
index 3cd0f6c..429e731 100644
--- a/pkg/junit/junit_test.go
+++ b/pkg/junit/junit_test.go
@@ -37,12 +37,12 @@ func TestMarshalUnmarshal(t *testing.T) {
Skipped: &Result{Message: "skipped", Type: "type", Data: "data"},
Error: &Result{Message: "error", Type: "type", Data: "data"},
Failure: &Result{Message: "failure", Type: "type", Data: "data"},
- SystemOut: "system-out",
- SystemErr: "system-err",
+ SystemOut: &Output{"system-out"},
+ SystemErr: &Output{"system-err"},
},
},
- SystemOut: "system-out",
- SystemErr: "system-err",
+ SystemOut: &Output{"system-out"},
+ SystemErr: &Output{"system-err"},
},
},
}
diff --git a/testdata/33-report.xml b/testdata/33-report.xml
index bd87331..34eabc3 100644
--- a/testdata/33-report.xml
+++ b/testdata/33-report.xml
@@ -6,5 +6,8 @@
+