use of jetbrains.buildServer.server.rest.model.problem.TestCounters in project teamcity-rest by JetBrains.
the class TestScopes method getTestCounters.
@XmlElement(name = "testCounters")
public TestCounters getTestCounters() {
return ValueWithDefault.decideDefault(myFields.isIncluded("testCounters"), () -> {
Fields testCounters = myFields.getNestedField("testCounters");
List<STestRun> runs = myTestScopes.stream().flatMap(scope -> scope.getTestRuns().stream()).collect(Collectors.toList());
// Will just calculate all counters for simplicity
TestCountersData data = new TestCountersData(runs);
return new TestCounters(testCounters, data);
});
}
Aggregations