Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #174 from tatlax3636/update-test-passing
Browse files Browse the repository at this point in the history
Fix skipped test logic
  • Loading branch information
danielyhuang authored Jul 27, 2022
2 parents 24e9d2a + c8e57c8 commit 9cf0164
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<artifactId>api-audit</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<version>3.7.24-SNAPSHOT</version>
<version>3.7.25-SNAPSHOT</version>
<description>Hygieia Audit Rest API Layer</description>
<url>https://github.com/Hygieia/${repository.name}</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ private double getTestCasePassPercent(List<TestCapability> testCapabilities) {
testCapability.getTestSuites().parallelStream().mapToDouble(TestSuite::getSkippedTestCaseCount).sum()
).sum();

return ((testCaseSuccessCount + testCaseSkipCount)/totalTestCaseCount) * 100;
if(totalTestCaseCount == 0 || testCaseSkipCount == totalTestCaseCount){
return 100.0;
}

return (testCaseSuccessCount/(totalTestCaseCount - testCaseSkipCount)) * 100;

}catch(Exception e){
LOGGER.error("Could not get 'testCasePassPercent', setting to 0.0%");
return 0.0;
Expand Down

0 comments on commit 9cf0164

Please sign in to comment.