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

Commit

Permalink
Merge pull request #77 from xucong053/main
Browse files Browse the repository at this point in the history
fix: inaccurate stat data in API test report
  • Loading branch information
debugtalk authored Feb 9, 2022
2 parents 8f99ec7 + 18fc22a commit edaef1b
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 edaef1b

Please sign in to comment.