Пример #1
0
 private void execute(RootTestDescriptor root) {
   TestPlan testPlan = TestPlan.from(root);
   TestExecutionListener testExecutionListener =
       listenerRegistry.getCompositeTestExecutionListener();
   testExecutionListener.testPlanExecutionStarted(testPlan);
   ExecutionListenerAdapter engineExecutionListener =
       new ExecutionListenerAdapter(testPlan, testExecutionListener);
   for (TestEngine testEngine : root.getTestEngines()) {
     TestDescriptor testDescriptor = root.getTestDescriptorFor(testEngine);
     testEngine.execute(new ExecutionRequest(testDescriptor, engineExecutionListener));
   }
   testExecutionListener.testPlanExecutionFinished(testPlan);
 }
Пример #2
0
 /**
  * Discover tests and build a {@link TestPlan} according to the supplied {@link
  * TestPlanSpecification} by querying all registered engines and collecting their results.
  *
  * @param specification the specification to be resolved
  * @return a {@code TestPlan} that contains all resolved {@linkplain TestIdentifier identifiers}
  *     from all registered engines
  */
 public TestPlan discover(TestPlanSpecification specification) {
   return TestPlan.from(discoverRootDescriptor(specification, "discovery"));
 }
Пример #3
0
 private TestIdentifier getTestIdentifier(TestDescriptor testDescriptor) {
   return testPlan.getTestIdentifier(new TestId(testDescriptor.getUniqueId()));
 }
Пример #4
0
 @Override
 public void dynamicTestRegistered(TestDescriptor testDescriptor) {
   TestIdentifier testIdentifier = TestIdentifier.from(testDescriptor);
   testPlan.add(testIdentifier);
   testExecutionListener.dynamicTestRegistered(testIdentifier);
 }