use of org.junit.platform.engine.ExecutionRequest in project junit5 by junit-team.
the class LauncherBasedEnableRuleMigrationSupportTests method executeTests.
private ExecutionEventRecorder executeTests(LauncherDiscoveryRequest request) {
TestDescriptor testDescriptor = discoverTests(request);
ExecutionEventRecorder eventRecorder = new ExecutionEventRecorder();
engine.execute(new ExecutionRequest(testDescriptor, eventRecorder, request.getConfigurationParameters()));
return eventRecorder;
}
use of org.junit.platform.engine.ExecutionRequest in project junit5 by junit-team.
the class DefaultLauncher method execute.
private void execute(Root root, ConfigurationParameters configurationParameters, TestExecutionListener... listeners) {
TestExecutionListenerRegistry listenerRegistry = buildListenerRegistryForExecution(listeners);
TestPlan testPlan = TestPlan.from(root.getEngineDescriptors());
TestExecutionListener testExecutionListener = listenerRegistry.getCompositeTestExecutionListener();
testExecutionListener.testPlanExecutionStarted(testPlan);
ExecutionListenerAdapter engineExecutionListener = new ExecutionListenerAdapter(testPlan, testExecutionListener);
for (TestEngine testEngine : root.getTestEngines()) {
TestDescriptor testDescriptor = root.getTestDescriptorFor(testEngine);
execute(testEngine, new ExecutionRequest(testDescriptor, engineExecutionListener, configurationParameters));
}
testExecutionListener.testPlanExecutionFinished(testPlan);
}
use of org.junit.platform.engine.ExecutionRequest in project junit5 by junit-team.
the class ExecutionEventRecorder method execute.
public static void execute(TestEngine testEngine, EngineDiscoveryRequest discoveryRequest, EngineExecutionListener listener) {
TestDescriptor engineTestDescriptor = testEngine.discover(discoveryRequest, UniqueId.forEngine(testEngine.getId()));
testEngine.execute(new ExecutionRequest(engineTestDescriptor, listener, discoveryRequest.getConfigurationParameters()));
}
use of org.junit.platform.engine.ExecutionRequest in project cucumber-jvm by cucumber.
the class CucumberTestEngineTest method createExecutionContext.
@Test
void createExecutionContext() {
EngineExecutionListener listener = new EmptyEngineExecutionListener();
ConfigurationParameters configuration = new EmptyConfigurationParameters();
EngineDiscoveryRequest discoveryRequest = new EmptyEngineDiscoveryRequest(configuration);
UniqueId id = UniqueId.forEngine(engine.getId());
TestDescriptor testDescriptor = engine.discover(discoveryRequest, id);
ExecutionRequest execution = new ExecutionRequest(testDescriptor, listener, configuration);
assertNotNull(engine.createExecutionContext(execution));
}
use of org.junit.platform.engine.ExecutionRequest in project junit5 by junit-team.
the class AbstractJupiterTestEngineTests method executeTests.
protected ExecutionEventRecorder executeTests(LauncherDiscoveryRequest request) {
TestDescriptor testDescriptor = discoverTests(request);
ExecutionEventRecorder eventRecorder = new ExecutionEventRecorder();
engine.execute(new ExecutionRequest(testDescriptor, eventRecorder, request.getConfigurationParameters()));
return eventRecorder;
}
Aggregations