Search in sources :

Example 11 with TestConsoleProperties

use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-plugins by JetBrains.

the class DartTestEventsConverterTest method createConsoleProperties.

protected TestConsoleProperties createConsoleProperties() {
    TestConsoleProperties properties = super.createConsoleProperties();
    TestConsoleProperties.HIDE_PASSED_TESTS.set(properties, false);
    TestConsoleProperties.OPEN_FAILURE_LINE.set(properties, false);
    TestConsoleProperties.SCROLL_TO_SOURCE.set(properties, false);
    TestConsoleProperties.SELECT_FIRST_DEFECT.set(properties, false);
    TestConsoleProperties.TRACK_RUNNING_TEST.set(properties, false);
    return properties;
}
Also used : TestConsoleProperties(com.intellij.execution.testframework.TestConsoleProperties)

Example 12 with TestConsoleProperties

use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-plugins by JetBrains.

the class DartTestRunningState method createConsole.

private static ConsoleView createConsole(@NotNull ExecutionEnvironment env) {
    final Project project = env.getProject();
    final DartRunConfiguration runConfiguration = (DartRunConfiguration) env.getRunProfile();
    final DartTestRunnerParameters runnerParameters = (DartTestRunnerParameters) runConfiguration.getRunnerParameters();
    final TestConsoleProperties testConsoleProperties = new DartConsoleProperties(runConfiguration, env);
    final ConsoleView consoleView = SMTestRunnerConnectionUtil.createConsole(DART_FRAMEWORK_NAME, testConsoleProperties);
    try {
        final VirtualFile dartFile = runnerParameters.getDartFileOrDirectory();
        consoleView.addMessageFilter(new DartConsoleFilter(project, dartFile));
        consoleView.addMessageFilter(new DartRelativePathsConsoleFilter(project, runnerParameters.computeProcessWorkingDirectory(project)));
        consoleView.addMessageFilter(new UrlFilter());
    } catch (RuntimeConfigurationError ignore) {
    /* can't happen because already checked */
    }
    Disposer.register(project, consoleView);
    return consoleView;
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) DartRelativePathsConsoleFilter(com.jetbrains.lang.dart.ide.runner.DartRelativePathsConsoleFilter) Project(com.intellij.openapi.project.Project) DartRunConfiguration(com.jetbrains.lang.dart.ide.runner.base.DartRunConfiguration) SMTRunnerConsoleView(com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView) ConsoleView(com.intellij.execution.ui.ConsoleView) DartConsoleFilter(com.jetbrains.lang.dart.ide.runner.DartConsoleFilter) UrlFilter(com.intellij.execution.filters.UrlFilter) RuntimeConfigurationError(com.intellij.execution.configurations.RuntimeConfigurationError) TestConsoleProperties(com.intellij.execution.testframework.TestConsoleProperties)

Example 13 with TestConsoleProperties

use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.

the class BaseSMTRunnerTestCase method createConsoleProperties.

protected TestConsoleProperties createConsoleProperties() {
    final ModuleRunConfiguration runConfiguration = createRunConfiguration();
    final TestConsoleProperties consoleProperties = new SMTRunnerConsoleProperties(runConfiguration, "SMRunnerTests", DefaultDebugExecutor.getDebugExecutorInstance());
    TestConsoleProperties.HIDE_PASSED_TESTS.set(consoleProperties, false);
    return consoleProperties;
}
Also used : ModuleRunConfiguration(com.intellij.execution.configurations.ModuleRunConfiguration) TestConsoleProperties(com.intellij.execution.testframework.TestConsoleProperties)

Example 14 with TestConsoleProperties

use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.

the class TestFrameworkActions method addPropertyListener.

public static void addPropertyListener(final AbstractProperty<Boolean> property, final TestFrameworkPropertyListener<Boolean> propertyListener, final TestFrameworkRunningModel model, final boolean sendValue) {
    final TestConsoleProperties properties = model.getProperties();
    if (sendValue) {
        properties.addListenerAndSendValue(property, propertyListener);
    } else {
        properties.addListener(property, propertyListener);
    }
    Disposer.register(model, new Disposable() {

        public void dispose() {
            properties.removeListener(property, propertyListener);
        }
    });
}
Also used : Disposable(com.intellij.openapi.Disposable) TestConsoleProperties(com.intellij.execution.testframework.TestConsoleProperties)

Example 15 with TestConsoleProperties

use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.

the class TestFrameworkActions method installFilterAction.

public static void installFilterAction(final TestFrameworkRunningModel model) {
    final TestConsoleProperties properties = model.getProperties();
    final TestFrameworkPropertyListener<Boolean> propertyListener = new TestFrameworkPropertyListener<Boolean>() {

        public void onChanged(final Boolean value) {
            model.setFilter(getFilter(properties));
        }
    };
    addPropertyListener(TestConsoleProperties.HIDE_PASSED_TESTS, propertyListener, model, true);
    addPropertyListener(TestConsoleProperties.HIDE_IGNORED_TEST, propertyListener, model, true);
    addPropertyListener(TestConsoleProperties.HIDE_SUCCESSFUL_CONFIG, propertyListener, model, true);
}
Also used : TestFrameworkPropertyListener(com.intellij.execution.testframework.TestFrameworkPropertyListener) TestConsoleProperties(com.intellij.execution.testframework.TestConsoleProperties)

Aggregations

TestConsoleProperties (com.intellij.execution.testframework.TestConsoleProperties)16 ProcessHandler (com.intellij.execution.process.ProcessHandler)5 ExecutionEnvironment (com.intellij.execution.runners.ExecutionEnvironment)4 ConsoleView (com.intellij.execution.ui.ConsoleView)4 MockPrinter (com.intellij.execution.testframework.sm.runner.ui.MockPrinter)3 NotNull (org.jetbrains.annotations.NotNull)3 DefaultExecutionResult (com.intellij.execution.DefaultExecutionResult)2 AttachToProcessListener (com.intellij.execution.testframework.sm.runner.ui.AttachToProcessListener)2 SMTestRunnerResultsForm (com.intellij.execution.testframework.sm.runner.ui.SMTestRunnerResultsForm)2 ModuleRunConfiguration (com.intellij.execution.configurations.ModuleRunConfiguration)1 RuntimeConfigurationError (com.intellij.execution.configurations.RuntimeConfigurationError)1 UrlFilter (com.intellij.execution.filters.UrlFilter)1 OSProcessHandler (com.intellij.execution.process.OSProcessHandler)1 TestFrameworkPropertyListener (com.intellij.execution.testframework.TestFrameworkPropertyListener)1 SMTestRunnerConnectionUtil (com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil)1 SMTRunnerConsoleProperties (com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties)1 SMTRunnerConsoleView (com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView)1 KarmaTestProxyFilterProvider (com.intellij.javascript.karma.tree.KarmaTestProxyFilterProvider)1 Disposable (com.intellij.openapi.Disposable)1 Project (com.intellij.openapi.project.Project)1