diff --git a/junit/junit.go b/junit/junit.go index 3bb0651..66e466c 100644 --- a/junit/junit.go +++ b/junit/junit.go @@ -43,11 +43,11 @@ type Testsuite struct { Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` Errors int `xml:"errors,attr"` + ID int `xml:"id,attr"` // optional attributes Disabled int `xml:"disabled,attr,omitempty"` Hostname string `xml:"hostname,attr,omitempty"` - ID int `xml:"id,attr,omitempty"` Package string `xml:"package,attr,omitempty"` Skipped int `xml:"skipped,attr,omitempty"` Time string `xml:"time,attr"` // duration in seconds @@ -136,6 +136,7 @@ func CreateFromReport(report gtr.Report, hostname string) Testsuites { suite := Testsuite{ Name: pkg.Name, Hostname: hostname, + ID: len(suites.Suites), } if !pkg.Timestamp.IsZero() { diff --git a/junit/junit_test.go b/junit/junit_test.go index 5516938..8c21f28 100644 --- a/junit/junit_test.go +++ b/junit/junit_test.go @@ -32,6 +32,7 @@ func TestCreateFromReport(t *testing.T) { Tests: 1, Failures: 1, Time: "0.000", + ID: 0, Testcases: []Testcase{ { Name: "BenchmarkFail", @@ -64,7 +65,7 @@ func TestMarshalUnmarshal(t *testing.T) { Errors: 1, Failures: 1, Hostname: "localhost", - ID: 1, + ID: 0, Package: "package", Skipped: 1, Time: "12.345", diff --git a/testdata/001-report.xml b/testdata/001-report.xml index fa64e0e..27f4355 100644 --- a/testdata/001-report.xml +++ b/testdata/001-report.xml @@ -1,6 +1,6 @@ - + @@ -12,7 +12,7 @@ line]]> - + @@ -23,7 +23,7 @@ message.]]> - + diff --git a/testdata/005-report.xml b/testdata/005-report.xml index 4ed233c..362c58e 100644 --- a/testdata/005-report.xml +++ b/testdata/005-report.xml @@ -1,5 +1,5 @@ - + diff --git a/testdata/007-report.xml b/testdata/007-report.xml index 05f1479..4bc75db 100644 --- a/testdata/007-report.xml +++ b/testdata/007-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/008-report.xml b/testdata/008-report.xml index 4b7b7e6..16e8a49 100644 --- a/testdata/008-report.xml +++ b/testdata/008-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/009-report.xml b/testdata/009-report.xml index b3742bd..ecef4bf 100644 --- a/testdata/009-report.xml +++ b/testdata/009-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/010-report.xml b/testdata/010-report.xml index 298aeda..c00e033 100644 --- a/testdata/010-report.xml +++ b/testdata/010-report.xml @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + diff --git a/testdata/011-report.xml b/testdata/011-report.xml index 0d1ba9d..5b6e92f 100644 --- a/testdata/011-report.xml +++ b/testdata/011-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/012-report.xml b/testdata/012-report.xml index 5d67f11..4306c58 100644 --- a/testdata/012-report.xml +++ b/testdata/012-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/013-report.xml b/testdata/013-report.xml index ae66973..c5e55eb 100644 --- a/testdata/013-report.xml +++ b/testdata/013-report.xml @@ -1,18 +1,18 @@ - + - + - + @@ -20,7 +20,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/testdata/014-report.xml b/testdata/014-report.xml index 7b16e29..22be3c6 100644 --- a/testdata/014-report.xml +++ b/testdata/014-report.xml @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ stacktrace]]> - + diff --git a/testdata/015-report.xml b/testdata/015-report.xml index f97312d..4b47199 100644 --- a/testdata/015-report.xml +++ b/testdata/015-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/016-report.xml b/testdata/016-report.xml index 56ae1e4..a0b1b2d 100644 --- a/testdata/016-report.xml +++ b/testdata/016-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/017-report.xml b/testdata/017-report.xml index 0a6554a..71297aa 100644 --- a/testdata/017-report.xml +++ b/testdata/017-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/018-report.xml b/testdata/018-report.xml index 298aeda..c00e033 100644 --- a/testdata/018-report.xml +++ b/testdata/018-report.xml @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + diff --git a/testdata/019-report.xml b/testdata/019-report.xml index 076d782..1472312 100644 --- a/testdata/019-report.xml +++ b/testdata/019-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/021-report.xml b/testdata/021-report.xml index 10cc8d2..d9dc975 100644 --- a/testdata/021-report.xml +++ b/testdata/021-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/022-report.xml b/testdata/022-report.xml index 521e33d..8bef445 100644 --- a/testdata/022-report.xml +++ b/testdata/022-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/023-report.xml b/testdata/023-report.xml index 300725c..0baa98a 100644 --- a/testdata/023-report.xml +++ b/testdata/023-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/024-report.xml b/testdata/024-report.xml index 91f9cdd..636391e 100644 --- a/testdata/024-report.xml +++ b/testdata/024-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/025-report.xml b/testdata/025-report.xml index 50ce583..b430ad7 100644 --- a/testdata/025-report.xml +++ b/testdata/025-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/026-report.xml b/testdata/026-report.xml index 1cbdf42..414c4cf 100644 --- a/testdata/026-report.xml +++ b/testdata/026-report.xml @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + diff --git a/testdata/027-report.xml b/testdata/027-report.xml index 0afc4d3..7a535bc 100644 --- a/testdata/027-report.xml +++ b/testdata/027-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/028-report.xml b/testdata/028-report.xml index 04b414c..da67e7f 100644 --- a/testdata/028-report.xml +++ b/testdata/028-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/029-report.xml b/testdata/029-report.xml index 3c446f2..447aa79 100644 --- a/testdata/029-report.xml +++ b/testdata/029-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/030-report.xml b/testdata/030-report.xml index 76b951b..a972508 100644 --- a/testdata/030-report.xml +++ b/testdata/030-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/031-report.xml b/testdata/031-report.xml index ae66973..c5e55eb 100644 --- a/testdata/031-report.xml +++ b/testdata/031-report.xml @@ -1,18 +1,18 @@ - + - + - + @@ -20,7 +20,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/testdata/032-report.xml b/testdata/032-report.xml index 5c62e35..e9d5782 100644 --- a/testdata/032-report.xml +++ b/testdata/032-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/033-report.xml b/testdata/033-report.xml index 1ae7bb5..7d70e19 100644 --- a/testdata/033-report.xml +++ b/testdata/033-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/034-report.xml b/testdata/034-report.xml index d5cb86d..9cedec2 100644 --- a/testdata/034-report.xml +++ b/testdata/034-report.xml @@ -1,16 +1,16 @@ - + - + - + diff --git a/testdata/035-report.xml b/testdata/035-report.xml index ecd1ced..db1a68c 100644 --- a/testdata/035-report.xml +++ b/testdata/035-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/036-report.xml b/testdata/036-report.xml index 4933958..33a521d 100644 --- a/testdata/036-report.xml +++ b/testdata/036-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/037-report.xml b/testdata/037-report.xml index 743f15d..d2480ff 100644 --- a/testdata/037-report.xml +++ b/testdata/037-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/100-report.xml b/testdata/100-report.xml index 1bf1363..d2c6693 100644 --- a/testdata/100-report.xml +++ b/testdata/100-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/101-report.xml b/testdata/101-report.xml index c7c9114..cadab2b 100644 --- a/testdata/101-report.xml +++ b/testdata/101-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/102-report.xml b/testdata/102-report.xml index b77589d..d0f7d2a 100644 --- a/testdata/102-report.xml +++ b/testdata/102-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/103-report.xml b/testdata/103-report.xml index bebcb4f..e61526e 100644 --- a/testdata/103-report.xml +++ b/testdata/103-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/104-report.xml b/testdata/104-report.xml index 39b647d..8c24b5b 100644 --- a/testdata/104-report.xml +++ b/testdata/104-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/105-report.xml b/testdata/105-report.xml index 5f3a460..9263841 100644 --- a/testdata/105-report.xml +++ b/testdata/105-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/106-report.xml b/testdata/106-report.xml index bb39f2c..1ac1935 100644 --- a/testdata/106-report.xml +++ b/testdata/106-report.xml @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/testdata/107-report.xml b/testdata/107-report.xml index bfd72e8..27d609d 100644 --- a/testdata/107-report.xml +++ b/testdata/107-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/108-report.xml b/testdata/108-report.xml index 2de6deb..8292bb8 100644 --- a/testdata/108-report.xml +++ b/testdata/108-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/109-report.xml b/testdata/109-report.xml index 29a1d3e..bf688d4 100644 --- a/testdata/109-report.xml +++ b/testdata/109-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/110-report.xml b/testdata/110-report.xml index 4933958..33a521d 100644 --- a/testdata/110-report.xml +++ b/testdata/110-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/111-report.xml b/testdata/111-report.xml index 0ebed11..3cf058c 100644 --- a/testdata/111-report.xml +++ b/testdata/111-report.xml @@ -1,6 +1,6 @@ - + diff --git a/testdata/112-report.xml b/testdata/112-report.xml index f08b135..01e40ee 100644 --- a/testdata/112-report.xml +++ b/testdata/112-report.xml @@ -1,6 +1,6 @@ - +