use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.
the class SMTestRunnerConnectionUtil method initConsoleView.
/** @deprecated use {@link #initConsoleView(SMTRunnerConsoleView, String)} (to be removed in IDEA 17) */
@SuppressWarnings({ "unused", "deprecation" })
public static void initConsoleView(@NotNull final SMTRunnerConsoleView consoleView, @NotNull final String testFrameworkName, @Nullable final TestLocationProvider locator, final boolean idBasedTreeConstruction, @Nullable final TestProxyFilterProvider filterProvider) {
consoleView.addAttachToProcessListener(new AttachToProcessListener() {
@Override
public void onAttachToProcess(@NotNull ProcessHandler processHandler) {
TestConsoleProperties properties = consoleView.getProperties();
SMTestLocator testLocator = new CompositeTestLocationProvider(locator);
TestProxyPrinterProvider printerProvider = null;
if (filterProvider != null) {
printerProvider = new TestProxyPrinterProvider(consoleView, filterProvider);
}
SMTestRunnerResultsForm resultsForm = consoleView.getResultsViewer();
attachEventsProcessors(properties, resultsForm, processHandler, testFrameworkName, testLocator, idBasedTreeConstruction, printerProvider);
}
});
consoleView.setHelpId("reference.runToolWindow.testResultsTab");
consoleView.initUI();
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.
the class SMTestRunnerConnectionUtil method initConsoleView.
public static void initConsoleView(@NotNull final SMTRunnerConsoleView consoleView, @NotNull final String testFrameworkName) {
consoleView.addAttachToProcessListener(new AttachToProcessListener() {
@Override
public void onAttachToProcess(@NotNull ProcessHandler processHandler) {
TestConsoleProperties properties = consoleView.getProperties();
TestProxyPrinterProvider printerProvider = null;
if (properties instanceof SMTRunnerConsoleProperties) {
TestProxyFilterProvider filterProvider = ((SMTRunnerConsoleProperties) properties).getFilterProvider();
if (filterProvider != null) {
printerProvider = new TestProxyPrinterProvider(consoleView, filterProvider);
}
}
SMTestLocator testLocator = FileUrlProvider.INSTANCE;
if (properties instanceof SMTRunnerConsoleProperties) {
SMTestLocator customLocator = ((SMTRunnerConsoleProperties) properties).getTestLocator();
if (customLocator != null) {
testLocator = new CombinedTestLocator(customLocator);
}
}
boolean idBasedTestTree = false;
if (properties instanceof SMTRunnerConsoleProperties) {
idBasedTestTree = ((SMTRunnerConsoleProperties) properties).isIdBasedTestTree();
}
SMTestRunnerResultsForm resultsForm = consoleView.getResultsViewer();
attachEventsProcessors(properties, resultsForm, processHandler, testFrameworkName, testLocator, idBasedTestTree, printerProvider);
}
});
consoleView.setHelpId("reference.runToolWindow.testResultsTab");
consoleView.initUI();
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-plugins by JetBrains.
the class JstdRunProfileState method createSMTRunnerConsoleView.
@NotNull
private SMTRunnerConsoleView createSMTRunnerConsoleView(@Nullable JstdServer ideServer) {
JstdRunConfiguration configuration = (JstdRunConfiguration) myEnvironment.getRunProfile();
JstdTestProxyFilterProvider filterProvider = new JstdTestProxyFilterProvider(myEnvironment.getProject());
TestConsoleProperties testConsoleProperties = new JstdConsoleProperties(configuration, myEnvironment.getExecutor(), filterProvider);
String propertyName = SMTestRunnerConnectionUtil.getSplitterPropertyName(JSTD_FRAMEWORK_NAME);
JstdConsoleView consoleView = new JstdConsoleView(testConsoleProperties, myEnvironment, propertyName, ideServer);
Disposer.register(myEnvironment.getProject(), consoleView);
SMTestRunnerConnectionUtil.initConsoleView(consoleView, JSTD_FRAMEWORK_NAME);
return consoleView;
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-plugins by JetBrains.
the class DartTestEventsConverterTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myNodes = new HashMap<>();
final ExecutionEnvironment environment = new ExecutionEnvironment();
myMockResettablePrinter = new MockPrinter(true);
TestConsoleProperties consoleProperties = createConsoleProperties();
myConsole = new MyConsoleView(consoleProperties, environment);
myConsole.initUI();
myResultsViewer = myConsole.getResultsViewer();
myEventsConverter = new DartTestEventsConverter(DartTestRunningState.DART_FRAMEWORK_NAME, consoleProperties, DartUrlResolver.getInstance(getProject(), getSourceRoot()));
myEventsProcessor = new DartTestEventsProcessor(consoleProperties.getProject(), DartTestRunningState.DART_FRAMEWORK_NAME);
myEventsProcessor.addEventsListener(myResultsViewer);
myEventsConverter.setProcessor(myEventsProcessor);
myTreeModel = myResultsViewer.getTreeView() == null ? null : (DefaultTreeModel) myResultsViewer.getTreeView().getModel();
assertNotNull(myTreeModel);
myParentNode = (DefaultMutableTreeNode) myTreeModel.getRoot();
myEventsProcessor.onStartTesting();
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-elixir by KronicDeth.
the class MixExUnitRunningState method execute.
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
ProcessHandler processHandler = startProcess();
TestConsoleProperties properties = new SMTRunnerConsoleProperties(myConfiguration, TEST_FRAMEWORK_NAME, executor);
ConsoleView console = createAndAttachConsole(TEST_FRAMEWORK_NAME, processHandler, properties);
ElixirConsoleUtil.attachFilters(myConfiguration.getProject(), console);
return new DefaultExecutionResult(console, processHandler, createActions(console, processHandler));
}
Aggregations