Add tests, failures and errors attributes on testsuites (#1072)

This commit is contained in:
ced42 2020-05-07 16:05:10 +02:00 committed by GitHub
parent 4eaf056399
commit 7526c8d347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,9 @@ type testSuitesXML struct {
type testSuiteXML struct {
XMLName xml.Name `xml:"testsuite"`
Suite string `xml:"name,attr"`
Tests int `xml:"tests,attr"`
Errors int `xml:"errors,attr"`
Failures int `xml:"failures,attr"`
TestCases []testCaseXML `xml:"testcase"`
}
@ -46,6 +49,8 @@ func (JunitXML) Print(ctx context.Context, issues []result.Issue) error {
suiteName := i.FilePath()
testSuite := suites[suiteName]
testSuite.Suite = i.FilePath()
testSuite.Tests++
testSuite.Failures++
tc := testCaseXML{
Name: i.FromLinter,