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

Commit 9cf0164

Browse files
authored
Merge pull request #174 from tatlax3636/update-test-passing
Fix skipped test logic
2 parents 24e9d2a + c8e57c8 commit 9cf0164

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>api-audit</artifactId>
55
<packaging>jar</packaging>
66
<name>${project.groupId}:${project.artifactId}</name>
7-
<version>3.7.24-SNAPSHOT</version>
7+
<version>3.7.25-SNAPSHOT</version>
88
<description>Hygieia Audit Rest API Layer</description>
99
<url>https://github.com/Hygieia/${repository.name}</url>
1010

src/main/java/com/capitalone/dashboard/evaluator/FeatureTestResultEvaluator.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@ private double getTestCasePassPercent(List<TestCapability> testCapabilities) {
181181
testCapability.getTestSuites().parallelStream().mapToDouble(TestSuite::getSkippedTestCaseCount).sum()
182182
).sum();
183183

184-
return ((testCaseSuccessCount + testCaseSkipCount)/totalTestCaseCount) * 100;
184+
if(totalTestCaseCount == 0 || testCaseSkipCount == totalTestCaseCount){
185+
return 100.0;
186+
}
187+
188+
return (testCaseSuccessCount/(totalTestCaseCount - testCaseSkipCount)) * 100;
189+
185190
}catch(Exception e){
186191
LOGGER.error("Could not get 'testCasePassPercent', setting to 0.0%");
187192
return 0.0;

0 commit comments

Comments
 (0)