Search in sources :

Example 1 with GaugeConsoleProperties

use of com.thoughtworks.gauge.execution.runner.GaugeConsoleProperties in project Intellij-Plugin by getgauge.

the class GaugeCommandLineState method execute.

@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
    if (GaugeVersion.isGreaterOrEqual(GaugeRunConfiguration.TEST_RUNNER_SUPPORT_VERSION, false) && GaugeSettingsService.getSettings().useIntelliJTestRunner()) {
        ProcessHandler handler = startProcess();
        GaugeConsoleProperties properties = new GaugeConsoleProperties(config, "Gauge", executor, handler);
        ConsoleView console = SMTestRunnerConnectionUtil.createAndAttachConsole("Gauge", handler, properties);
        DefaultExecutionResult result = new DefaultExecutionResult(console, handler, createActions(console, handler));
        if (ActionManager.getInstance().getAction("RerunFailedTests") != null) {
            AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(console);
            if (action != null) {
                action.setModelProvider(((SMTRunnerConsoleView) console)::getResultsViewer);
                result.setRestartActions(action);
            }
        }
        return result;
    }
    return super.execute(executor, runner);
}
Also used : DefaultExecutionResult(com.intellij.execution.DefaultExecutionResult) SMTRunnerConsoleView(com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView) ConsoleView(com.intellij.execution.ui.ConsoleView) GaugeConsoleProperties(com.thoughtworks.gauge.execution.runner.GaugeConsoleProperties) ProcessHandler(com.intellij.execution.process.ProcessHandler) AbstractRerunFailedTestsAction(com.intellij.execution.testframework.actions.AbstractRerunFailedTestsAction) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

DefaultExecutionResult (com.intellij.execution.DefaultExecutionResult)1 ProcessHandler (com.intellij.execution.process.ProcessHandler)1 AbstractRerunFailedTestsAction (com.intellij.execution.testframework.actions.AbstractRerunFailedTestsAction)1 SMTRunnerConsoleView (com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView)1 ConsoleView (com.intellij.execution.ui.ConsoleView)1 GaugeConsoleProperties (com.thoughtworks.gauge.execution.runner.GaugeConsoleProperties)1 NotNull (org.jetbrains.annotations.NotNull)1