From ff6d3c7167b6dd52d6e5affa95a9baa8f5749eb4 Mon Sep 17 00:00:00 2001 From: samadala Date: Tue, 7 Aug 2018 17:17:19 +0530 Subject: [PATCH 1/5] Show error message on Framework35 --- .../TestPlatformHelpers/TestRequestManager.cs | 7 +++- .../ExecutionTests.cs | 18 ++++++++++ .../TranslationLayerTests/DiscoverTests.cs | 29 ++++++++++++++++ .../EventHandler/DiscoveryEventHandler.cs | 9 ++++- .../TestRequestManagerTests.cs | 34 +++++++++++++++---- 5 files changed, 89 insertions(+), 8 deletions(-) diff --git a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs index 541edd54a8..b73a0632d9 100644 --- a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs +++ b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs @@ -8,7 +8,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers using System.IO; using System.Linq; using System.Reflection; - using System.Threading; using System.Threading.Tasks; using System.Xml; using System.Xml.XPath; @@ -395,6 +394,12 @@ private bool UpdateRunSettingsIfRequired(string runsettingsXml, List sou ConsoleLogger.RaiseTestRunWarning(incompatibleSettingWarning); } + if (Constants.DotNetFramework35.Equals(chosenFramework.Name)) + { + EqtTrace.Info("TestRequestManager.UpdateRunSettingsIfRequired: Show warning message on /Framework:Framework35 option."); + throw new TestPlatformException("/Frmaeowrk:Frameowrk35 not supported."); + } + if (EqtTrace.IsInfoEnabled) { EqtTrace.Info("Compatible sources list : "); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs index 42aa0fa34d..1bf059b61a 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs @@ -231,5 +231,23 @@ public void IncompatibleSourcesWarningShouldBeDisplayedInTheConsole(RunnerInfo r // When both x64 & x86 DLL is passed x64 dll will be ignored. this.StdOutputContains(expectedWarningContains); } + + [TestMethod] + [NetFullTargetFrameworkDataSource(useCoreRunner:false)] + public void ExecuteTestsForFramework35ShouldPrintErrorMessage(RunnerInfo runnerInfo) + { + AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo); + var expectedWarningContains = @"/Frmaeowrk:Frameowrk35 not supported."; + var assemblyPaths = this.GetAssetFullPath("SimpleTestProject.dll"); + + var arguments = PrepareArguments(assemblyPaths, this.GetTestAdapterPath(), string.Empty, this.FrameworkArgValue, runnerInfo.InIsolationValue); + arguments = string.Concat(arguments, " /Framework:Framework35"); + + this.InvokeVsTest(arguments); + + this.ExitCodeEquals(1); + + this.StdErrorContains(expectedWarningContains); + } } } diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs index 904b9bdd37..459b782eea 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs @@ -12,6 +12,7 @@ namespace Microsoft.TestPlatform.AcceptanceTests.TranslationLayerTests using Microsoft.VisualStudio.TestPlatform.Common.Telemetry; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestTools.UnitTesting; + using VisualStudio.TestPlatform.ObjectModel.Logging; [TestClass] public class DiscoverTests : AcceptanceTestBase @@ -72,6 +73,34 @@ public void DiscoverTestsUsingDiscoveryEventHandler2AndTelemetryOptedOut(RunnerI Assert.AreEqual(0, this.discoveryEventHandler2.Metrics.Count); } + [TestMethod] + [NetFullTargetFrameworkDataSource] + public void DiscoverTestsShouldFailForFramework35(RunnerInfo runnerInfo) + { + AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo); + this.ExecuteNotSupportedRunnerFrameworkTests(runnerInfo.RunnerFramework, Netcoreapp, Message); + this.Setup(); + + string runSettingsXml = @" + + + Framework35 + true + + "; + + this.vstestConsoleWrapper.DiscoverTests( + this.GetTestAssemblies(), + runSettingsXml, + new TestPlatformOptions() { CollectMetrics = false }, + this.discoveryEventHandler2); + + Assert.AreEqual(1, this.discoveryEventHandler2.Messages.Count); + StringAssert.Contains(this.discoveryEventHandler2.Messages[0], "/Frmaeowrk:Frameowrk35 not supported."); + Assert.AreEqual(1, this.discoveryEventHandler2.TestMessageLevels.Count); + Assert.AreEqual(TestMessageLevel.Error, this.discoveryEventHandler2.TestMessageLevels[0]); + } + [TestMethod] [NetFullTargetFrameworkDataSource] [NetCoreTargetFrameworkDataSource] diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs index f560758d4f..89bc574e9c 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs @@ -58,6 +58,10 @@ public class DiscoveryEventHandler2 : ITestDiscoveryEventsHandler2 /// public List DiscoveredTestCases { get; } + public List TestMessageLevels; + + public List Messages; + /// /// Gets the metrics. /// @@ -66,6 +70,8 @@ public class DiscoveryEventHandler2 : ITestDiscoveryEventsHandler2 public DiscoveryEventHandler2() { this.DiscoveredTestCases = new List(); + this.TestMessageLevels = new List(); + this.Messages = new List(); } public void HandleRawMessage(string rawMessage) @@ -75,7 +81,8 @@ public void HandleRawMessage(string rawMessage) public void HandleLogMessage(TestMessageLevel level, string message) { - // No Op + this.TestMessageLevels.Add(level); + this.Messages.Add(message); } public void HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryCompleteEventArgs, IEnumerable lastChunk) diff --git a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs index 8fbd7eb8f3..e0bb55f305 100644 --- a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs +++ b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs @@ -7,7 +7,6 @@ namespace vstest.console.UnitTests.TestPlatformHelpers { using System; - using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -23,23 +22,18 @@ namespace vstest.console.UnitTests.TestPlatformHelpers using Microsoft.VisualStudio.TestPlatform.Common.Logging; using Microsoft.VisualStudio.TestPlatform.Common.Telemetry; using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.Interfaces; - using Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.Interfaces; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Runtime.Versioning; - using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.Utilities; - using Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.CommandLine; using Microsoft.VisualStudio.TestPlatform.CommandLineUtilities; - using Microsoft.VisualStudio.TestPlatform.CommandLine.Resources; using Moq; using vstest.console.UnitTests.TestDoubles; using Microsoft.VisualStudio.TestPlatform.Utilities; - using Microsoft.VisualStudio.TestPlatform.CommandLine.Internal; [TestClass] public class TestRequestManagerTests @@ -852,6 +846,34 @@ public void RunTestsShouldReadTheBatchSizeFromSettingsAndSetItForTestRunCriteria Assert.AreEqual(15, actualTestRunCriteria.FrequencyOfRunStatsChangeEvent); } + [TestMethod] + public void RunTestsShouldThrowForFramework35() + { + var payload = new TestRunRequestPayload() + { + Sources = new List() { "a.dll" }, + RunSettings = + @" + + + Framework35 + + " + }; + + TestRunCriteria actualTestRunCriteria = null; + var mockDiscoveryRequest = new Mock(); + this.mockTestPlatform.Setup(mt => mt.CreateTestRunRequest(It.IsAny(), It.IsAny(), It.IsAny())).Callback( + (IRequestData requestData, TestRunCriteria runCriteria, TestPlatformOptions options) => + { + actualTestRunCriteria = runCriteria; + }).Returns(mockDiscoveryRequest.Object); + this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())).Returns(new FrameworkName(Constants.DotNetFramework35)); + var actualErrorMessage = Assert.ThrowsException( () => this.testRequestManager.RunTests(payload, new Mock().Object, new Mock().Object, this.protocolConfig)).Message; + + Assert.AreEqual("/Frmaeowrk:Frameowrk35 not supported.", actualErrorMessage); + } + [TestMethod] public void RunTestsShouldPassSameProtocolConfigInRequestData() { From f392f944fdbf807500729d000f4c4fc54a0fbdcf Mon Sep 17 00:00:00 2001 From: samadala Date: Thu, 9 Aug 2018 11:38:59 +0530 Subject: [PATCH 2/5] Add error to resources files --- src/vstest.console/Resources/Resources.Designer.cs | 11 +++++++++++ src/vstest.console/Resources/Resources.resx | 3 +++ src/vstest.console/Resources/xlf/Resources.cs.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.de.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.es.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.fr.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.it.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.ja.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.ko.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.pl.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.pt-BR.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.ru.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.tr.xlf | 5 +++++ src/vstest.console/Resources/xlf/Resources.xlf | 5 +++++ .../Resources/xlf/Resources.zh-Hans.xlf | 5 +++++ .../Resources/xlf/Resources.zh-Hant.xlf | 5 +++++ .../TestPlatformHelpers/TestRequestManager.cs | 2 +- .../ExecutionTests.cs | 2 +- .../TranslationLayerTests/DiscoverTests.cs | 2 +- .../TestPlatformHelpers/TestRequestManagerTests.cs | 2 +- 20 files changed, 88 insertions(+), 4 deletions(-) diff --git a/src/vstest.console/Resources/Resources.Designer.cs b/src/vstest.console/Resources/Resources.Designer.cs index 108daf91a2..92e8556252 100644 --- a/src/vstest.console/Resources/Resources.Designer.cs +++ b/src/vstest.console/Resources/Resources.Designer.cs @@ -657,6 +657,17 @@ public static string FrameworkArgumentHelp } } + /// + /// Looks up a localized string similar to Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode".. + /// + public static string Framework35NotSupported + { + get + { + return ResourceManager.GetString("Framework35NotSupported", resourceCulture); + } + } + /// /// Looks up a localized string similar to The /Framework argument requires the target .Net Framework version for the test run. Example: /Framework:".NETFramework,Version=v4.5.1". /// diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index 911cdca2ca..e41c7568d2 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -276,6 +276,9 @@ '{0}' not found. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index aa5fadbd3c..1e3d19554d 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index 4219321736..2914ac0ae5 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index 2e72164cb1..0670a3ef9b 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1623,6 +1623,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index ee878f7e27..f749630c95 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index 427bf271d7..f9052f80e8 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index 5cbd22a7ae..77d2344161 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index d50f437e75..ddc3c36b2d 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index d5167876f8..424ece9fd7 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1616,6 +1616,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index 5329da03f6..5404e84bb7 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1616,6 +1616,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index 648ed6296d..3e6fffd3eb 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index 1df5cd7273..9edb464103 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.xlf b/src/vstest.console/Resources/xlf/Resources.xlf index 0a16b482f4..3923bd9218 100644 --- a/src/vstest.console/Resources/xlf/Resources.xlf +++ b/src/vstest.console/Resources/xlf/Resources.xlf @@ -814,6 +814,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index 577ecdee9b..101d109022 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index 8f63bb805c..95919195f8 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1618,6 +1618,11 @@ Logger argument '{0}' is invalid. + + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + + \ No newline at end of file diff --git a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs index b73a0632d9..2a9fcb5198 100644 --- a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs +++ b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs @@ -397,7 +397,7 @@ private bool UpdateRunSettingsIfRequired(string runsettingsXml, List sou if (Constants.DotNetFramework35.Equals(chosenFramework.Name)) { EqtTrace.Info("TestRequestManager.UpdateRunSettingsIfRequired: Show warning message on /Framework:Framework35 option."); - throw new TestPlatformException("/Frmaeowrk:Frameowrk35 not supported."); + throw new TestPlatformException(Resources.Framework35NotSupported); } if (EqtTrace.IsInfoEnabled) diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs index 1bf059b61a..8b720a125d 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs @@ -237,7 +237,7 @@ public void IncompatibleSourcesWarningShouldBeDisplayedInTheConsole(RunnerInfo r public void ExecuteTestsForFramework35ShouldPrintErrorMessage(RunnerInfo runnerInfo) { AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo); - var expectedWarningContains = @"/Frmaeowrk:Frameowrk35 not supported."; + var expectedWarningContains = "Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 \"compatibly mode\"."; var assemblyPaths = this.GetAssetFullPath("SimpleTestProject.dll"); var arguments = PrepareArguments(assemblyPaths, this.GetTestAdapterPath(), string.Empty, this.FrameworkArgValue, runnerInfo.InIsolationValue); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs index 459b782eea..ed041a96e3 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs @@ -96,7 +96,7 @@ public void DiscoverTestsShouldFailForFramework35(RunnerInfo runnerInfo) this.discoveryEventHandler2); Assert.AreEqual(1, this.discoveryEventHandler2.Messages.Count); - StringAssert.Contains(this.discoveryEventHandler2.Messages[0], "/Frmaeowrk:Frameowrk35 not supported."); + StringAssert.Contains(this.discoveryEventHandler2.Messages[0], "Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 \"compatibly mode\"."); Assert.AreEqual(1, this.discoveryEventHandler2.TestMessageLevels.Count); Assert.AreEqual(TestMessageLevel.Error, this.discoveryEventHandler2.TestMessageLevels[0]); } diff --git a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs index e0bb55f305..49326d5908 100644 --- a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs +++ b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs @@ -871,7 +871,7 @@ public void RunTestsShouldThrowForFramework35() this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())).Returns(new FrameworkName(Constants.DotNetFramework35)); var actualErrorMessage = Assert.ThrowsException( () => this.testRequestManager.RunTests(payload, new Mock().Object, new Mock().Object, this.protocolConfig)).Message; - Assert.AreEqual("/Frmaeowrk:Frameowrk35 not supported.", actualErrorMessage); + Assert.AreEqual("Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 \"compatibly mode\".", actualErrorMessage); } [TestMethod] From 965e540772fb7dca65578a11cf8b176f160b8eab Mon Sep 17 00:00:00 2001 From: samadala Date: Thu, 9 Aug 2018 11:54:50 +0530 Subject: [PATCH 3/5] Remove Framework35 from help --- src/vstest.console/Resources/Resources.resx | 4 ++-- src/vstest.console/Resources/xlf/Resources.cs.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.de.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.es.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.fr.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.it.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.ja.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.ko.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.pl.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.pt-BR.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.ru.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.tr.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.xlf | 4 ++-- src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf | 8 ++++---- src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf | 8 ++++---- .../TestPlatformHelpers/TestRequestManager.cs | 2 +- .../Processors/FrameworkArgumentProcessorTests.cs | 2 +- 17 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index e41c7568d2..f10ca31bd8 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -283,7 +283,7 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. The /Framework argument requires the target .Net Framework version for the test run. Example: /Framework:".NETFramework,Version=v4.5.1" @@ -324,7 +324,7 @@ Argument {0} is not expected in the 'EnableCodeCoverage' command. Specify the command without the argument (Example: vstest.console.exe myTests.dll /EnableCodeCoverage) and try again. - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Argument {0} is not expected in the 'InIsolation' command. Specify the command without the argument (Example: vstest.console.exe myTests.dll /InIsolation) and try again. diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index 1e3d19554d..dc3a399916 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Verze rozhraní> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Verze rozhraní> Cílová verze rozhraní .NET Framework, která se použije k provedení testu. Platné hodnoty jsou ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" atd. Další podporované hodnoty jsou Framework35, Framework40, Framework45, FrameworkCore10 a FrameworkUap10. - + --Framework | / Framework: < Framework verze > Cílové rozhraní .net Framework verze pro spuštění testu. @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Neplatná verze rozhraní .NET Framework: {0}. Zadejte prosím úplný název cílového rozhraní. Další podporované verze jsou Framework35, Framework40, Framework45, FrameworkCore10 a FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index 2914ac0ae5..a6c0d48096 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:< Frameworkversion > + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:< Frameworkversion > Die .NET Framework-Zielversion, die für die Testausführung verwendet werden soll. Gültige Werte sind ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0 " usw. Weitere unterstützte Werte sind "Framework35", "Framework40", "Framework45", "FrameworkCore10" und "FrameworkUap10". - + -Framework | / Framework: < Frameworkversion > Ziel von .net Framework-Version für die Ausführung verwendet werden. @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Ungültige .NET Framework-Version: {0}. Geben Sie den vollständigen Namen von TargetFramework an. Weitere unterstützte .NET Framework-Versionen sind "Framework35", "Framework40", "Framework45", "FrameworkCore10" und "FrameworkUap10". diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index 0670a3ef9b..464f666bc3 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -740,12 +740,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Versión de .NET Framework> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Versión de .NET Framework> Versión de .NET Framework de destino que se usará para la ejecución de pruebas. Los valores válidos son: ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. Otros valores admitidos son: Framework35, Framework40, Framework45, FrameworkCore10 y FrameworkUap10. - + --Framework | / Framework: < versión de Framework > Trabajar en .net Framework versión que se utilizará para la ejecución de la prueba. @@ -764,7 +764,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Versión de .NET Framework no válida: {0}. Proporcione el nombre completo de TargetFramework. Otras versiones de .NET Framework admitidas son Framework35, Framework40, Framework45, FrameworkCore10 y FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index f749630c95..c526943753 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<version du framework> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<version du framework> Version cible du .Net Framework à utiliser pour l'exécution des tests. Les valeurs valides sont : ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0", etc. Les autres valeurs prises en charge sont Framework35, Framework40, Framework45, FrameworkCore10 et FrameworkUap10. - + --Framework | / Framework : < Version .NET Framework > Ciblez .net version de Framework à utiliser pour l’exécution du test. @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Version non valide du .Net Framework : {0}. Indiquez le nom complet de TargetFramework. Les autres versions du .Net Framework prises en charge sont Framework35, Framework40, Framework45, FrameworkCore10 et FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index f9052f80e8..e82aec27b1 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Versione framework> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Versione framework> Versione di .NET Framework di destinazione da usare per l'esecuzione dei test. Valori validi: ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" e così via. Altri valori supportati: Framework35, Framework40, Framework45, FrameworkCore10 e FrameworkUap10. - + -Framework | / Framework: < versione Framework > Destinazione di .net Framework versione da utilizzare per l'esecuzione del test. @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. La versione di .NET Framework {0} non è valida. Specificare il nome completo della versione di .NET Framework di destinazione. Altre versioni di .NET Framework supportate: Framework35, Framework40, Framework45, FrameworkCore10 e FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index 77d2344161..dd407e23e8 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Framework のバージョン> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Framework のバージョン> テストの実行に使用する対象の .Net Framework バージョンです。 有効な値は ".NETFramework,Version=v4.5.1"、".NETCoreApp,Version=v1.0" などです。 その他のサポートされる値は Framework35、Framework40、Framework45、FrameworkCore10、FrameworkUap10 です。 - + --フレームワーク |/フレームワーク: < フレームワーク バージョン > 対象の .Net Framework のバージョンをテストの実行に使用します。 @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. .Net Framework バージョンが無効です: {0}。TargetFramework の完全な名前を指定してください。その他のサポートされる .Net Framework バージョンは Framework35、Framework40、Framework45、FrameworkCore10、FrameworkUap10 です。 diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index ddc3c36b2d..819c5314e0 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<프레임워크 버전> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<프레임워크 버전> 테스트 실행에 사용할 대상 .NET Framework 버전입니다. 유효한 값은 ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" 등입니다. 지원되는 기타 값은 Framework35, Framework40, Framework45, FrameworkCore10 및 FrameworkUap10입니다. - + -프레임 워크 | / 프레임 워크: < 프레임 워크 버전 > 대상.Net Framework 버전 테스트 실행에 사용할 수 있습니다. @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. .NET Framework 버전 {0}이(가) 잘못되었습니다. TargetFramework의 전체 경로를 지정하세요. 지원되는 다른 .NET Framework 버전은 Framework35, Framework40, Framework45, FrameworkCore10 및 FrameworkUap10입니다. diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index 424ece9fd7..db4761ce55 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -737,12 +737,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<wersja struktury> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<wersja struktury> Docelowa wersja programu .NET Framework, która zostanie użyta na potrzeby wykonania testu. Prawidłowe wartości to ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" itp. Inne obsługiwane wartości to Framework35, Framework40, Framework45, FrameworkCore10 i FrameworkUap10. - + --Framework | / Framework: < Framework w wersji > Cel systemu .net Framework w wersji używanego do wykonania testu. @@ -761,7 +761,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Nieprawidłowa wersja programu .NET Framework: {0}. Podaj pełną nazwę struktury docelowej. Inne obsługiwane wersje programu .NET Framework to Framework35, Framework40, Framework45, FrameworkCore10 i FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index 5404e84bb7..1e1afdc562 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -737,12 +737,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Framework Version> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Framework Version> Indique a versão de destino do .Net Framework a ser usada para a execução do teste. Os valores válidos são ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. Outros valores compatíveis são Framework35, Framework40, Framework45, FrameworkCore10 e FrameworkUap10. - + -Framework | / Framework: < versão do Framework > Direcionar o .net Framework versão a ser usada para a execução do teste. @@ -761,7 +761,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Versão inválida do .Net Framework: {0}. Forneça o nome completo do TargetFramework. Outras versões compatíveis do .Net Framework são Framework35, Framework40, Framework45, FrameworkCore10 e FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index 3e6fffd3eb..75fdb03fc9 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<версия платформы> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<версия платформы> Целевая версия .NET Framework для выполнения тестов. Допустимые значения: ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" и т. д. Другие поддерживаемые значения: Framework35, Framework40, Framework45, FrameworkCore10 и FrameworkUap10. - + --Framework | / Framework: < Framework версии > Целевой .net Framework версии, используемый для выполнения теста. @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Недопустимая версия .NET Framework: {0}. Укажите полное имя целевой платформы. Другие поддерживаемые версии .NET Framework: Framework35, Framework40, Framework45, FrameworkCore10 и FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index 9edb464103..49b1801037 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Framework Sürümü> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Framework Sürümü> Test yürütmesi için kullanılacak hedef .NET Framework sürümü. Geçerli değerler ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" vb. Framework35, Framework40, Framework45, FrameworkCore10 ve FrameworkUap10 desteklenen diğer değerlerdir. - + --Framework | / Framework: < Framework sürüm > Hedef .net Framework sürümünü test yürütmesi için kullanılacak. @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. Geçersiz .NET Framework sürümü: {0}. Lütfen TargetFramework tam adını belirtin. Desteklenen diğer .NET Framework sürümleri Framework35, Framework40, Framework45, FrameworkCore10 ve FrameworkUap10’dur. diff --git a/src/vstest.console/Resources/xlf/Resources.xlf b/src/vstest.console/Resources/xlf/Resources.xlf index 3923bd9218..c25fbe0581 100644 --- a/src/vstest.console/Resources/xlf/Resources.xlf +++ b/src/vstest.console/Resources/xlf/Resources.xlf @@ -312,7 +312,7 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. @@ -320,7 +320,7 @@ - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index 101d109022..c1a547b67d 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Framework Version> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Framework Version> 用于测试执行的目标 .Net Framework 版本。 有效值为 ".NETFramework,Version=v4.5.1"、".NETCoreApp,Version=v1.0" 等。 其他受支持的值为 Framework35、Framework40、Framework45、FrameworkCore10 和 FrameworkUap10。 - + — 框架 | / 框架︰ < 框架版本 > 目标.Net Framework 版本以用于测试执行。 @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. 无效的 .Net Framework 版本: {0}。请提供 TargetFramework 的全名。其他支持的 .Net Framework 版本为 Framework35、Framework40、Framework45、FrameworkCore10 和 FrameworkUap10。 diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index 95919195f8..9f9dfdc1e0 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -738,12 +738,12 @@ --Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. - Other supported values are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. - --Framework|/Framework:<Framework 版本> + Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + --Framework|/Framework:<Framework 版本> 要用於測試執行的目標 .Net Framework 版本。 有效值為 ".NETFramework,Version=v4.5.1"、".NETCoreApp,Version=v1.0" 等等 其他支援的值為 Framework35、Framework40、Framework45、FrameworkCore10 與 FrameworkUap10。 - + — 框架 | / 框架︰ < 框架版本 > 目标.Net Framework 版本以用于测试执行。 @@ -762,7 +762,7 @@ fuzzyMatch="15" wordcount="16" adjWordcount="13.6" curWordcount="13.6" - Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10. + Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10. .Net Framework 版本無效:{0}。請提供 TargetFramework 的全名。其他支援的 .Net Framework 版本為 Framework35、Framework40、Framework45、FrameworkCore10 以及 FrameworkUap10。 diff --git a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs index 2a9fcb5198..80fcda1712 100644 --- a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs +++ b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs @@ -396,7 +396,7 @@ private bool UpdateRunSettingsIfRequired(string runsettingsXml, List sou if (Constants.DotNetFramework35.Equals(chosenFramework.Name)) { - EqtTrace.Info("TestRequestManager.UpdateRunSettingsIfRequired: Show warning message on /Framework:Framework35 option."); + EqtTrace.Error("TestRequestManager.UpdateRunSettingsIfRequired: throw exception on /Framework:Framework35 option."); throw new TestPlatformException(Resources.Framework35NotSupported); } diff --git a/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs index 42350127d2..3be575cb2d 100644 --- a/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs @@ -87,7 +87,7 @@ public void InitializeShouldThrowIfArgumentIsInvalid() { ExceptionUtilities.ThrowsException( () => this.executor.Initialize("foo"), - "Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework35, Framework40, Framework45, FrameworkCore10 and FrameworkUap10.", + "Invalid .Net Framework version:{0}. Please give the fullname of the TargetFramework(Example: .NETCoreApp,Version=v2.0). Other supported .Net Framework versions are Framework40, Framework45, FrameworkCore10 and FrameworkUap10.", "foo"); } From 27d1115a3494705b87c227cec27385db532b0ad7 Mon Sep 17 00:00:00 2001 From: samadala Date: Thu, 9 Aug 2018 15:48:27 +0530 Subject: [PATCH 4/5] update error message --- .../Resources/Resources.Designer.cs | 2 +- src/vstest.console/Resources/Resources.resx | 2 +- .../Resources/xlf/Resources.cs.xlf | 2 +- .../Resources/xlf/Resources.de.xlf | 2 +- .../Resources/xlf/Resources.es.xlf | 2 +- .../Resources/xlf/Resources.fr.xlf | 2 +- .../Resources/xlf/Resources.it.xlf | 2 +- .../Resources/xlf/Resources.ja.xlf | 2 +- .../Resources/xlf/Resources.ko.xlf | 2 +- .../Resources/xlf/Resources.pl.xlf | 2 +- .../Resources/xlf/Resources.pt-BR.xlf | 2 +- .../Resources/xlf/Resources.ru.xlf | 2 +- .../Resources/xlf/Resources.tr.xlf | 2 +- .../Resources/xlf/Resources.xlf | 2 +- .../Resources/xlf/Resources.zh-Hans.xlf | 2 +- .../Resources/xlf/Resources.zh-Hant.xlf | 2 +- .../ExecutionTests.cs | 4 ++-- .../TranslationLayerTests/DiscoverTests.cs | 7 +++--- .../EventHandler/DiscoveryEventHandler.cs | 22 +++++++++++++------ 19 files changed, 36 insertions(+), 29 deletions(-) diff --git a/src/vstest.console/Resources/Resources.Designer.cs b/src/vstest.console/Resources/Resources.Designer.cs index 92e8556252..77784baf82 100644 --- a/src/vstest.console/Resources/Resources.Designer.cs +++ b/src/vstest.console/Resources/Resources.Designer.cs @@ -658,7 +658,7 @@ public static string FrameworkArgumentHelp } /// - /// Looks up a localized string similar to Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode".. + /// Looks up a localized string similar to Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".. /// public static string Framework35NotSupported { diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index f10ca31bd8..a84f2781a5 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -277,7 +277,7 @@ '{0}' not found. - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". --Framework|/Framework:<Framework Version> diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index dc3a399916..3edc5664bb 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index a6c0d48096..6e187c744c 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index 464f666bc3..356132d512 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1624,7 +1624,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index c526943753..938adbd48f 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index e82aec27b1..40eef19a13 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index dd407e23e8..db0923befe 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index 819c5314e0..65f59727f2 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index db4761ce55..26dc70b020 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1617,7 +1617,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index 1e1afdc562..03845bd620 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1617,7 +1617,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index 75fdb03fc9..e1754f7895 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index 49b1801037..8a2796d5bc 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.xlf b/src/vstest.console/Resources/xlf/Resources.xlf index c25fbe0581..c89c7b3ee5 100644 --- a/src/vstest.console/Resources/xlf/Resources.xlf +++ b/src/vstest.console/Resources/xlf/Resources.xlf @@ -815,7 +815,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index c1a547b67d..202546ac8f 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index 9f9dfdc1e0..4f727a9407 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1619,7 +1619,7 @@ - Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". + Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode". Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs index 8b720a125d..3707a3339e 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs @@ -237,11 +237,11 @@ public void IncompatibleSourcesWarningShouldBeDisplayedInTheConsole(RunnerInfo r public void ExecuteTestsForFramework35ShouldPrintErrorMessage(RunnerInfo runnerInfo) { AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo); - var expectedWarningContains = "Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 \"compatibly mode\"."; + var expectedWarningContains = "Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 \"compatibility mode\"."; var assemblyPaths = this.GetAssetFullPath("SimpleTestProject.dll"); var arguments = PrepareArguments(assemblyPaths, this.GetTestAdapterPath(), string.Empty, this.FrameworkArgValue, runnerInfo.InIsolationValue); - arguments = string.Concat(arguments, " /Framework:Framework35"); + arguments = string.Concat(arguments, " /Framework:.NETFramework,Version=v3.5"); this.InvokeVsTest(arguments); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs index ed041a96e3..1f6b61202a 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs @@ -95,10 +95,9 @@ public void DiscoverTestsShouldFailForFramework35(RunnerInfo runnerInfo) new TestPlatformOptions() { CollectMetrics = false }, this.discoveryEventHandler2); - Assert.AreEqual(1, this.discoveryEventHandler2.Messages.Count); - StringAssert.Contains(this.discoveryEventHandler2.Messages[0], "Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 \"compatibly mode\"."); - Assert.AreEqual(1, this.discoveryEventHandler2.TestMessageLevels.Count); - Assert.AreEqual(TestMessageLevel.Error, this.discoveryEventHandler2.TestMessageLevels[0]); + Assert.AreEqual(1, this.discoveryEventHandler2.testMessages.Count); + StringAssert.Contains(this.discoveryEventHandler2.testMessages[0].message, "Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 \"compatibility mode\"."); + Assert.AreEqual(TestMessageLevel.Error, this.discoveryEventHandler2.testMessages[0].testMessageLevel); } [TestMethod] diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs index 89bc574e9c..7704df3a4a 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/DiscoveryEventHandler.cs @@ -50,6 +50,18 @@ public void HandleRawMessage(string rawMessage) } } + public struct TestMessage + { + public TestMessageLevel testMessageLevel; + public string message; + + public TestMessage(TestMessageLevel testMessageLevel, string message) + { + this.testMessageLevel = testMessageLevel; + this.message = message; + } + } + /// public class DiscoveryEventHandler2 : ITestDiscoveryEventsHandler2 { @@ -58,9 +70,7 @@ public class DiscoveryEventHandler2 : ITestDiscoveryEventsHandler2 /// public List DiscoveredTestCases { get; } - public List TestMessageLevels; - - public List Messages; + public List testMessages; /// /// Gets the metrics. @@ -70,8 +80,7 @@ public class DiscoveryEventHandler2 : ITestDiscoveryEventsHandler2 public DiscoveryEventHandler2() { this.DiscoveredTestCases = new List(); - this.TestMessageLevels = new List(); - this.Messages = new List(); + this.testMessages = new List(); } public void HandleRawMessage(string rawMessage) @@ -81,8 +90,7 @@ public void HandleRawMessage(string rawMessage) public void HandleLogMessage(TestMessageLevel level, string message) { - this.TestMessageLevels.Add(level); - this.Messages.Add(message); + this.testMessages.Add(new TestMessage(level, message)); } public void HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryCompleteEventArgs, IEnumerable lastChunk) From f81167fde9f8ba786742d372b165336158221fd0 Mon Sep 17 00:00:00 2001 From: samadala Date: Thu, 9 Aug 2018 16:09:56 +0530 Subject: [PATCH 5/5] Update unit tests --- .../TestPlatformHelpers/TestRequestManagerTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs index 49326d5908..ac9ef40c09 100644 --- a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs +++ b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs @@ -871,7 +871,7 @@ public void RunTestsShouldThrowForFramework35() this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())).Returns(new FrameworkName(Constants.DotNetFramework35)); var actualErrorMessage = Assert.ThrowsException( () => this.testRequestManager.RunTests(payload, new Mock().Object, new Mock().Object, this.protocolConfig)).Message; - Assert.AreEqual("Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 \"compatibly mode\".", actualErrorMessage); + Assert.AreEqual("Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 \"compatibility mode\".", actualErrorMessage); } [TestMethod]