private IIterationRunner createIterationRunner(SpockExecutionContext context, ParameterizedFeatureChildExecutor childExecutor) {
    return new IIterationRunner() {
      private final AtomicInteger iterationIndex = new AtomicInteger(0);

      @Override
      public CompletableFuture<ExecutionResult> runIteration(Object[] args, int estimatedNumIterations) {
        int currIterationIndex = iterationIndex.getAndIncrement();
        IterationInfo iterationInfo = createIterationInfo(context, currIterationIndex, args, estimatedNumIterations);
        IterationNode iterationNode = new IterationNode(
          context.getParentId().append("iteration", String.valueOf(currIterationIndex)),
          context.getRunContext().getConfiguration(RunnerConfiguration.class), iterationInfo);

        if (context.getErrorInfoCollector().hasErrors()) {
          return CompletableFuture.completedFuture(ExecutionResult.REJECTED);
        }
        if (iterationInfo.getFeature().getIterationFilter().isAllowed(iterationInfo.getIterationIndex())) {
          return childExecutor.execute(iterationNode);
        }
        return CompletableFuture.completedFuture(ExecutionResult.SKIPPED);
      }
    };
  }
Adds the ability to run parameterized features.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/runtime/PlatformParameterizedSpecRunner.java