in junit.go [27:53]
func convertToTestSuite(results []string, classname string) junit.Testsuite {
ts := junit.Testsuite{}
var runtime float64
for _, testResult := range results {
tcs, err := convertToTestCase(testResult)
if err != nil {
continue
}
ts.Testcases = append(ts.Testcases, tcs...)
for _, tc := range tcs {
tc.Classname = classname
if i, err := strconv.ParseFloat(tc.Time, 64); err == nil {
runtime += i
}
ts.Tests++
if tc.Skipped != nil {
ts.Skipped++
}
if tc.Failure != nil {
ts.Failures++
}
}
}
ts.Time = fmt.Sprintf("%.3f", runtime)
return ts
}