@Test public void aggregatesCompletedTests() { fakeDeviceTestFilesRetriever.thatReturns(testResults); AggregatedTestResult aggregatedTestResult = aggregator.aggregateTestResults(devicePools, testCaseEvents); assertThat(aggregatedTestResult.getPoolTestResults().get(0).getTestResults(), hasItems( completedTest, anotherCompletedTest ) ); }
@Nonnull @Override public AggregatedTestResult aggregateTestResults(@Nonnull Collection<Pool> pools, @Nonnull Collection<TestCaseEvent> testCases) { List<PoolTestResult> poolTestResults = pools.stream() .map(pool -> poolTestResult() .withPool(pool) .withTestResults(getTestResultsForPool(pool)) .build()) .collect(toList()); List<TestResult> ignoredTestResults = getIgnoredTestResults(testCases); List<TestResult> fatalCrashedTests = getFatalCrashedTests(getExecutedTests(poolTestResults, ignoredTestResults), testCases); return aggregatedTestResult() .withPoolTestResults(poolTestResults) .withIgnoredTests(ignoredTestResults) .withFatalCrashedTests(fatalCrashedTests) .build(); }
FilesRetrieverBasedAggregator implements Aggregator { @Nonnull @Override public AggregatedTestResult aggregateTestResults(@Nonnull Collection<Pool> pools, @Nonnull Collection<TestCaseEvent> testCases) { List<PoolTestResult> poolTestResults = pools.stream() .map(pool -> poolTestResult() .withPool(pool) .withTestResults(getTestResultsForPool(pool)) .build()) .collect(toList()); List<TestResult> ignoredTestResults = getIgnoredTestResults(testCases); List<TestResult> fatalCrashedTests = getFatalCrashedTests(getExecutedTests(poolTestResults, ignoredTestResults), testCases); return aggregatedTestResult() .withPoolTestResults(poolTestResults) .withIgnoredTests(ignoredTestResults) .withFatalCrashedTests(fatalCrashedTests) .build(); } }
FilesRetrieverBasedAggregator implements Aggregator { @Nonnull @Override public AggregatedTestResult aggregateTestResults(@Nonnull Collection<Pool> pools, @Nonnull Collection<TestCaseEvent> testCases) { List<PoolTestResult> poolTestResults = pools.stream() .map(pool -> poolTestResult() .withPool(pool) .withTestResults(getTestResultsForPool(pool)) .build()) .collect(toList()); List<TestResult> ignoredTestResults = getIgnoredTestResults(testCases); List<TestResult> fatalCrashedTests = getFatalCrashedTests(getExecutedTests(poolTestResults, ignoredTestResults), testCases); return aggregatedTestResult() .withPoolTestResults(poolTestResults) .withIgnoredTests(ignoredTestResults) .withFatalCrashedTests(fatalCrashedTests) .build(); } FilesRetrieverBasedAggregator(DeviceTestFilesRetriever deviceTestFilesRetriever); }
FilesRetrieverBasedAggregator implements Aggregator { @Nonnull @Override public AggregatedTestResult aggregateTestResults(@Nonnull Collection<Pool> pools, @Nonnull Collection<TestCaseEvent> testCases) { List<PoolTestResult> poolTestResults = pools.stream() .map(pool -> poolTestResult() .withPool(pool) .withTestResults(getTestResultsForPool(pool)) .build()) .collect(toList()); List<TestResult> ignoredTestResults = getIgnoredTestResults(testCases); List<TestResult> fatalCrashedTests = getFatalCrashedTests(getExecutedTests(poolTestResults, ignoredTestResults), testCases); return aggregatedTestResult() .withPoolTestResults(poolTestResults) .withIgnoredTests(ignoredTestResults) .withFatalCrashedTests(fatalCrashedTests) .build(); } FilesRetrieverBasedAggregator(DeviceTestFilesRetriever deviceTestFilesRetriever); @Nonnull @Override AggregatedTestResult aggregateTestResults(@Nonnull Collection<Pool> pools,
                                                     @Nonnull Collection<TestCaseEvent> testCases); }
FilesRetrieverBasedAggregator implements Aggregator { @Nonnull @Override public AggregatedTestResult aggregateTestResults(@Nonnull Collection<Pool> pools, @Nonnull Collection<TestCaseEvent> testCases) { List<PoolTestResult> poolTestResults = pools.stream() .map(pool -> poolTestResult() .withPool(pool) .withTestResults(getTestResultsForPool(pool)) .build()) .collect(toList()); List<TestResult> ignoredTestResults = getIgnoredTestResults(testCases); List<TestResult> fatalCrashedTests = getFatalCrashedTests(getExecutedTests(poolTestResults, ignoredTestResults), testCases); return aggregatedTestResult() .withPoolTestResults(poolTestResults) .withIgnoredTests(ignoredTestResults) .withFatalCrashedTests(fatalCrashedTests) .build(); } FilesRetrieverBasedAggregator(DeviceTestFilesRetriever deviceTestFilesRetriever); @Nonnull @Override AggregatedTestResult aggregateTestResults(@Nonnull Collection<Pool> pools,
                                                     @Nonnull Collection<TestCaseEvent> testCases);  }