use of com.intellij.execution.testframework.TestConsoleProperties in project buck by facebook.
the class TestExecutionState method execute.
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
final ProcessHandler processHandler = runBuildCommand(executor);
final TestConsoleProperties properties = new BuckTestConsoleProperties(processHandler, mProject, mConfiguration, "Buck test", executor);
final ConsoleView console = SMTestRunnerConnectionUtil.createAndAttachConsole("buck test", processHandler, properties);
return new DefaultExecutionResult(console, processHandler, AnAction.EMPTY_ARRAY);
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-elixir by KronicDeth.
the class MixExUnitRunningState method createAndAttachConsole.
/**
* Unifies the interface for {@code SMTestRunnerConnectionUtil.createAndAttachConsole} between 141 and later releases
*/
private ConsoleView createAndAttachConsole(@NotNull String testFrameworkName, @NotNull ProcessHandler processHandler, @NotNull TestConsoleProperties consoleProperties) throws ExecutionException {
Class<SMTestRunnerConnectionUtil> klass = SMTestRunnerConnectionUtil.class;
ConsoleView consoleView = null;
try {
Method createAndAttachConsole = klass.getMethod("createAndAttachConsole", String.class, ProcessHandler.class, TestConsoleProperties.class);
try {
consoleView = (ConsoleView) createAndAttachConsole.invoke(null, testFrameworkName, processHandler, consoleProperties);
} catch (IllegalAccessException | InvocationTargetException e) {
LOGGER.error(e);
}
} catch (NoSuchMethodException noSuchCreateAndAttachConsole3Method) {
try {
Method createAndAttachConsole = klass.getMethod("createAndAttachConsole", String.class, ProcessHandler.class, TestConsoleProperties.class, ExecutionEnvironment.class);
try {
consoleView = (ConsoleView) createAndAttachConsole.invoke(null, testFrameworkName, processHandler, consoleProperties, getEnvironment());
} catch (IllegalAccessException | InvocationTargetException e) {
LOGGER.error(e);
}
} catch (NoSuchMethodException noSuchCreateAndAttachConsole4Method) {
noSuchCreateAndAttachConsole4Method.printStackTrace();
}
}
return consoleView;
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.
the class GeneralToSMTRunnerEventsConvertorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
TestConsoleProperties consoleProperties = createConsoleProperties();
TestConsoleProperties.HIDE_PASSED_TESTS.set(consoleProperties, false);
TestConsoleProperties.OPEN_FAILURE_LINE.set(consoleProperties, false);
TestConsoleProperties.SCROLL_TO_SOURCE.set(consoleProperties, false);
TestConsoleProperties.SELECT_FIRST_DEFECT.set(consoleProperties, false);
TestConsoleProperties.TRACK_RUNNING_TEST.set(consoleProperties, false);
final ExecutionEnvironment environment = new ExecutionEnvironment();
myMockResettablePrinter = new MockPrinter(true);
myConsole = new MyConsoleView(consoleProperties, environment);
myConsole.initUI();
myResultsViewer = myConsole.getResultsViewer();
myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(consoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");
myEventsProcessor.addEventsListener(myResultsViewer);
myTreeModel = myResultsViewer.getTreeView().getModel();
myEventsProcessor.onStartTesting();
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.
the class SMTRunnerConsoleTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
final TestConsoleProperties consoleProperties = createConsoleProperties();
final ExecutionEnvironment environment = new ExecutionEnvironment();
myMockResettablePrinter = new MockPrinter(true);
myConsole = new MyConsoleView(consoleProperties, environment);
myConsole.initUI();
myResultsViewer = myConsole.getResultsViewer();
myRootSuite = myResultsViewer.getTestsRootNode();
myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(consoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");
myEventsProcessor.onStartTesting();
}
use of com.intellij.execution.testframework.TestConsoleProperties in project intellij-community by JetBrains.
the class SMTestProxyTest method testNavigatable.
public void testNavigatable() {
TestConsoleProperties properties = EasyMock.createMock(TestConsoleProperties.class);
assertNull(mySuite.getDescriptor(null, properties));
mySuite.addChild(mySimpleTest);
assertNull(mySuite.getDescriptor(null, properties));
assertNull(mySimpleTest.getDescriptor(null, properties));
}
Aggregations