in rest-api/src/jetbrains/buildServer/server/rest/data/problem/TestCountersData.java [60:96]
public TestCountersData(@NotNull final Collection<STestRun> testRuns,
boolean calcSuccess,
boolean calcFailed,
boolean calcMuted,
boolean calcIgnored,
boolean calcNewFailure,
boolean calcDuration) {
if (calcFailed) myFailed = 0;
if (calcMuted) myMuted = 0;
if (calcSuccess) myPassed = 0;
if (calcIgnored) myIgnored = 0;
if (calcNewFailure) myNewFailed = 0;
if (calcDuration) myDuration = 0l;
for(STestRun testRun : testRuns) {
if (calcMuted && testRun.isMuted()) {
myMuted++;
}
if (calcIgnored && testRun.isIgnored()) {
myIgnored++;
}
final Status status = testRun.getStatus();
if (calcSuccess && status.isSuccessful()) {
myPassed++;
}
if (calcFailed && status.isFailed() && !testRun.isMuted()) {
myFailed++;
}
if (calcNewFailure && testRun.isNewFailure() && !testRun.isMuted()) {
myNewFailed++;
}
if(calcDuration) {
myDuration += testRun.getDuration();
}
}
myCount = testRuns.size();
}