mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 19:47:14 +08:00
fix: inaccurate stat data in API test report
This commit is contained in:
@@ -272,12 +272,11 @@ func (s *Summary) appendCaseSummary(caseSummary *testCaseSummary) {
|
|||||||
s.Stat.TestSteps.Total += len(caseSummary.Records)
|
s.Stat.TestSteps.Total += len(caseSummary.Records)
|
||||||
if caseSummary.Success {
|
if caseSummary.Success {
|
||||||
s.Stat.TestCases.Success += 1
|
s.Stat.TestCases.Success += 1
|
||||||
s.Stat.TestSteps.Successes += len(caseSummary.Records)
|
|
||||||
} else {
|
} else {
|
||||||
s.Stat.TestCases.Fail += 1
|
s.Stat.TestCases.Fail += 1
|
||||||
s.Stat.TestSteps.Successes += len(caseSummary.Records) - 1
|
|
||||||
s.Stat.TestSteps.Failures += 1
|
|
||||||
}
|
}
|
||||||
|
s.Stat.TestSteps.Successes += caseSummary.Stat.Successes
|
||||||
|
s.Stat.TestSteps.Failures += caseSummary.Stat.Failures
|
||||||
s.Details = append(s.Details, caseSummary)
|
s.Details = append(s.Details, caseSummary)
|
||||||
s.Success = s.Success && caseSummary.Success
|
s.Success = s.Success && caseSummary.Success
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user