use of com.teamscale.test_impacted.engine.executor.TestExecutorRequest in project teamscale-jacoco-agent by cqse.
the class InternalImpactedTestEngine method runTestExecutor.
private void runTestExecutor(ExecutionRequest request) {
List<TestDetails> availableTests = new ArrayList<>();
List<TestExecution> testExecutions = new ArrayList<>();
for (TestDescriptor engineTestDescriptor : request.getRootTestDescriptor().getChildren()) {
Optional<String> engineId = engineTestDescriptor.getUniqueId().getEngineId();
if (!engineId.isPresent()) {
LOGGER.error(() -> "Engine id for test descriptor " + engineTestDescriptor + " not present. Skipping execution of the engine.");
continue;
}
TestEngine testEngine = testEngineRegistry.getTestEngine(engineId.get());
AvailableTests availableTestsForEngine = TestDescriptorUtils.getAvailableTests(testEngine, engineTestDescriptor);
TestExecutorRequest testExecutorRequest = new TestExecutorRequest(testEngine, engineTestDescriptor, request.getEngineExecutionListener(), request.getConfigurationParameters());
List<TestExecution> testExecutionsOfEngine = testExecutor.execute(testExecutorRequest);
testExecutions.addAll(testExecutionsOfEngine);
availableTests.addAll(availableTestsForEngine.getTestList());
}
testDataWriter.dumpTestDetails(availableTests);
testDataWriter.dumpTestExecutions(testExecutions);
}
Aggregations