diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/GeneralToSMTRunnerEventsConvertor.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/GeneralToSMTRunnerEventsConvertor.java index 24a40e1365d3..b8a37e359518 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/GeneralToSMTRunnerEventsConvertor.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/GeneralToSMTRunnerEventsConvertor.java @@ -264,7 +264,7 @@ public class GeneralToSMTRunnerEventsConvertor extends GeneralTestEventsProcesso SMTestProxy newSuite = findChildByName(parentSuite, suiteName); if (newSuite == null) { //new suite - newSuite = new SMTestProxy(suiteName, true, locationUrl); + newSuite = new SMTestProxy(suiteName, true, locationUrl, parentSuite.isPreservePresentableName()); if (myLocator != null) { newSuite.setLocator(myLocator); diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java index 634f0e0a1475..57eeda7bddf4 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java @@ -90,6 +90,10 @@ public class SMTestProxy extends AbstractTestProxy { myPreservePresentableName = preservePresentableName; } + public boolean isPreservePresentableName() { + return myPreservePresentableName; + } + public void setLocator(@NotNull SMTestLocator testLocator) { myLocator = testLocator; } @@ -851,7 +855,11 @@ public class SMTestProxy extends AbstractTestProxy { private ProcessHandler myHandler; public SMRootTestProxy() { - super("[root]", true, null); + this(false); + } + + public SMRootTestProxy(boolean preservePresentableName) { + super("[root]", true, null, preservePresentableName); } public void setTestsReporterAttached() { diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTestRunnerResultsForm.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTestRunnerResultsForm.java index fe2f478346ca..bf4694cf153b 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTestRunnerResultsForm.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTestRunnerResultsForm.java @@ -137,7 +137,7 @@ public class SMTestRunnerResultsForm extends TestResultsPanel //Create tests common suite root //noinspection HardCodedStringLiteral - myTestsRootNode = new SMTestProxy.SMRootTestProxy(); + myTestsRootNode = new SMTestProxy.SMRootTestProxy(consoleProperties.isPreservePresentableName()); //todo myTestsRootNode.setOutputFilePath(runConfiguration.getOutputFilePath()); // Fire selection changed and move focus on SHIFT+ENTER diff --git a/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java b/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java index a79777b025fe..00f5db4fc238 100644 --- a/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java +++ b/platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java @@ -69,6 +69,7 @@ public abstract class TestConsoleProperties extends StoringPropertyContainer imp private ConsoleView myConsole; private boolean myUsePredefinedMessageFilter = true; private GlobalSearchScope myScope; + private boolean myPreservePresentableName = false; protected final Map> myListeners = ContainerUtil.newHashMap(); @@ -109,6 +110,14 @@ public abstract class TestConsoleProperties extends StoringPropertyContainer imp return scope; } + public boolean isPreservePresentableName() { + return myPreservePresentableName; + } + + public void setPreservePresentableName(boolean preservePresentableName) { + myPreservePresentableName = preservePresentableName; + } + public void addListener(@NotNull AbstractProperty property, @NotNull TestFrameworkPropertyListener listener) { List listeners = myListeners.get(property); if (listeners == null) {