diff --git a/ingest.go b/ingest.go index 94266a7..67b730e 100644 --- a/ingest.go +++ b/ingest.go @@ -41,7 +41,9 @@ func ingestSuite(root xmlNode) Suite { suite.Tests = append(suite.Tests, testcase) case "properties": props := ingestProperties(node) - suite.Properties = props + for k, v := range props { + suite.Properties[k] = v + } case "system-out": suite.SystemOut = string(node.Content) case "system-err": @@ -90,6 +92,11 @@ func ingestTestcase(root xmlNode) Test { test.Status = StatusError test.Message = node.Attr("message") test.Error = ingestError(node) + case "properties": + props := ingestProperties(node) + for k, v := range props { + test.Properties[k] = v + } case "system-out": test.SystemOut = string(node.Content) case "system-err": diff --git a/ingest_test.go b/ingest_test.go index 181f7ae..16748c1 100644 --- a/ingest_test.go +++ b/ingest_test.go @@ -107,6 +107,8 @@ func TestExamplesInTheWild(t *testing.T) { assertLen(t, suites[0].Tests, 1) assertEqual(t, "\n I am stdout!\n ", suites[0].Tests[0].SystemOut) assertEqual(t, "\n I am stderr!\n ", suites[0].Tests[0].SystemErr) + assertEqual(t, "some.property.value", suites[0].Tests[0].Properties["some.property.name"]) + assertEqual(t, "some.class.name", suites[0].Tests[0].Properties["classname"]) }, }, { diff --git a/testdata/cubic.xml b/testdata/cubic.xml index eb695db..33dd571 100644 --- a/testdata/cubic.xml +++ b/testdata/cubic.xml @@ -66,7 +66,14 @@ type="" > - + + + + + + + STDOUT text diff --git a/testdata/python-junit-xml.xml b/testdata/python-junit-xml.xml index 3957224..c8ecbfc 100644 --- a/testdata/python-junit-xml.xml +++ b/testdata/python-junit-xml.xml @@ -2,6 +2,9 @@ + + + I am stdout!