Fix aggregated report trend
@@ -14,10 +14,13 @@ public class TestResultTrendSeriesBuilder extends SeriesBuilder<AbstractTestResu
@Override
protected Map<String, Integer> computeSeries(AbstractTestResultAction testResultAction) {
Map<String, Integer> series = new HashMap<>();
- series.put(TOTALS_KEY, testResultAction.getTotalCount());
- series.put(PASSED_KEY, testResultAction.getPassedTests().size());
- series.put(FAILED_KEY, testResultAction.getFailCount());
- series.put(SKIPPED_KEY, testResultAction.getSkipCount());
+ int totalCount = testResultAction.getTotalCount();
+ int failCount = testResultAction.getFailCount();
+ int skipCount = testResultAction.getSkipCount();
+ series.put(TOTALS_KEY, totalCount);
+ series.put(PASSED_KEY, totalCount - failCount - skipCount);
+ series.put(FAILED_KEY, failCount);
+ series.put(SKIPPED_KEY, skipCount);
return series;
}
}
