override fun doExecute()

in src/main/kotlin/com/pestphp/pest/features/parallel/PestParallelProgramRunner.kt [41:56]


    override fun doExecute(state: RunProfileState, environment: ExecutionEnvironment): RunContentDescriptor? {
        PestUsagesCollector.logParallelTestExecution(environment.project)

        val executionResult = if (environment.runProfile is PestRerunProfile) {
            state.execute(environment.executor, this)
        } else {
            val runConfiguration = environment.runProfile as? PestRunConfiguration
                ?: throw ExecutionException(PestBundle.message("PEST_PARALLEL_IS_NOT_SUPPORTED_FOR_SELECTED_RUN_PROFILE"))
            val command = createPestParallelCommand(runConfiguration)
            runConfiguration.checkAndGetState(environment, command)?.execute(environment.executor, this)
        }
        if (executionResult == null) throw ExecutionException(PhpBundle.message("execution.result.is.null"))
        val contentDescriptor = RunContentBuilder(executionResult, environment).showRunContent(environment.contentToReuse)
        postprocessExecutionResult(contentDescriptor, environment, PestBundle.message("PARALLEL_TESTING_IS_SUPPORTED_FROM_VERSION_2"))
        return contentDescriptor
    }