Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Commit

Permalink
fix: inaccurate stat data in API test report
Browse files Browse the repository at this point in the history
  • Loading branch information
xucong053 committed Feb 9, 2022
1 parent 8f99ec7 commit 18fc22a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions models.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,11 @@ func (s *Summary) appendCaseSummary(caseSummary *testCaseSummary) {
s.Stat.TestSteps.Total += len(caseSummary.Records)
if caseSummary.Success {
s.Stat.TestCases.Success += 1
s.Stat.TestSteps.Successes += len(caseSummary.Records)
} else {
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.Success = s.Success && caseSummary.Success
}
Expand Down

0 comments on commit 18fc22a

Please sign in to comment.