void (Project project, VirtualFile file, Long executionId, Executor executor) { try { final ImportRunProfile profile = new ImportRunProfile(file, project, executor); Executor defaultExecutor = DefaultRunExecutor.getRunExecutorInstance(); //runner should be default to be able to execute ImportProfile, thus it's required to pass defaultExecutor ExecutionEnvironmentBuilder builder = ExecutionEnvironmentBuilder.create(project, defaultExecutor, profile); //to correct icon in com.intellij.execution.runners.FakeRerunAction (appended in RunTab), let's set executor here builder.executor(executor); builder.target(profile.getTarget()); if (executionId != null) { builder.executionId(executionId); } builder.buildAndExecute(); } catch (ExecutionException e1) { Messages.showErrorDialog(project, e1.getMessage(), SmRunnerBundle.message("sm.test.runner.abstract.import.test.error.title")); } }