DynamicTestExecutor(final DynamicCaseProcessor dynamicCaseProcessor, ExcelFormatTestReporter reporter, final TestContext context,
            final IDynamicCase dynamicCase) {
        this.dynamicCaseProcessor = dynamicCaseProcessor;
        this.reporter = reporter;
        this.context = context;
        this.dynamicCase = dynamicCase;
        final Concurrency concurrency = context.getTestMethod().getAnnotation(Concurrency.class);
        if ( null != concurrency ) {
            threads = concurrency.threads();
        } else {
            threads = 1;
        }
        executor = Executors.newFixedThreadPool(threads, new ThreadFactory() {

            private int counter = 0;

            @Override
            public Thread newThread(Runnable r) {
                return new DynamicTestThread(++counter, r);
            }
        });
    }