Skip to content

Commit 7526c8d

Browse files
authored
Add tests, failures and errors attributes on testsuites (#1072)
1 parent 4eaf056 commit 7526c8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/printers/junitxml.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ type testSuitesXML struct {
1717
type testSuiteXML struct {
1818
XMLName xml.Name `xml:"testsuite"`
1919
Suite string `xml:"name,attr"`
20+
Tests int `xml:"tests,attr"`
21+
Errors int `xml:"errors,attr"`
22+
Failures int `xml:"failures,attr"`
2023
TestCases []testCaseXML `xml:"testcase"`
2124
}
2225

@@ -46,6 +49,8 @@ func (JunitXML) Print(ctx context.Context, issues []result.Issue) error {
4649
suiteName := i.FilePath()
4750
testSuite := suites[suiteName]
4851
testSuite.Suite = i.FilePath()
52+
testSuite.Tests++
53+
testSuite.Failures++
4954

5055
tc := testCaseXML{
5156
Name: i.FromLinter,

0 commit comments

Comments
 (0)