From 98dadc3fb0567b545e3395e9ffdb577077b11afe Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Tue, 10 Jul 2018 14:21:39 +0530 Subject: [PATCH 01/10] Proc dump changes --- .../BlameCollector.cs | 37 ++++-- .../Constants.cs | 10 ++ .../Interfaces/IProcessDumpUtility.cs | 5 +- .../ProcessDumpUtility.cs | 21 +++- .../Constants.cs | 5 + .../EnableBlameArgumentProcessor.cs | 23 +++- .../BlameCollectorTests.cs | 118 ++++++++++++++++-- .../ProcessDumpUtilityTests.cs | 28 +++++ 8 files changed, 211 insertions(+), 36 deletions(-) diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs index 9ac6ea5605..7b6fab127a 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs @@ -30,6 +30,8 @@ public class BlameCollector : DataCollector, ITestExecutionEnvironmentSpecifier private int testStartCount; private int testEndCount; private bool processDumpEnabled; + private bool alwaysCollectProcessDump; + private bool processFullDumpEnabled; private string attachmentGuid; /// @@ -97,7 +99,13 @@ public override void Initialize( if (this.configurationElement != null) { - this.processDumpEnabled = this.configurationElement[Constants.DumpModeKey] != null; + var collectDumpNode = this.configurationElement[Constants.DumpModeKey]; + this.processDumpEnabled = collectDumpNode != null; + if (this.processDumpEnabled) + { + this.alwaysCollectProcessDump = string.Equals(collectDumpNode.Attributes[Constants.CollectDumpAlwaysKey]?.Value, "true", StringComparison.OrdinalIgnoreCase); + this.processFullDumpEnabled = string.Equals(collectDumpNode.Attributes[Constants.DumpTypeKey]?.Value, "full", StringComparison.OrdinalIgnoreCase); + } } this.attachmentGuid = Guid.NewGuid().ToString().Replace("-", string.Empty); @@ -159,23 +167,26 @@ private void SessionEnded_Handler(object sender, SessionEndEventArgs args) if (this.processDumpEnabled) { - try + if (this.testStartCount > this.testEndCount || this.alwaysCollectProcessDump) { - var dumpFile = this.processDumpUtility.GetDumpFile(); - if (!string.IsNullOrEmpty(dumpFile)) + try { - var fileTranferInformation = new FileTransferInformation(this.context.SessionDataCollectionContext, dumpFile, true); - this.dataCollectionSink.SendFileAsync(fileTranferInformation); + var dumpFile = this.processDumpUtility.GetDumpFile(); + if (!string.IsNullOrEmpty(dumpFile)) + { + var fileTranferInformation = new FileTransferInformation(this.context.SessionDataCollectionContext, dumpFile, true); + this.dataCollectionSink.SendFileAsync(fileTranferInformation); + } + else + { + EqtTrace.Warning("BlameCollector.SessionEnded_Handler: blame:CollectDump was enabled but dump file was not generated."); + } } - else + catch (FileNotFoundException ex) { - EqtTrace.Warning("BlameCollector.SessionEnded_Handler: blame:CollectDump was enabled but dump file was not generated."); + this.logger.LogWarning(args.Context, ex.Message); } } - catch (FileNotFoundException ex) - { - this.logger.LogWarning(args.Context, ex.Message); - } } this.DeregisterEvents(); @@ -195,7 +206,7 @@ private void TestHostLaunched_Handler(object sender, TestHostLaunchedEventArgs a try { - this.processDumpUtility.StartProcessDump(args.TestHostProcessId, this.attachmentGuid, this.GetResultsDirectory()); + this.processDumpUtility.StartProcessDump(args.TestHostProcessId, this.attachmentGuid, this.GetResultsDirectory(), this.processFullDumpEnabled); } catch (TestPlatformException e) { diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs index f060ab8a0a..76f7ab32c3 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs @@ -42,5 +42,15 @@ internal static class Constants /// Configuration key name for dump mode /// public const string DumpModeKey = "CollectDump"; + + /// + /// Configuration key name for coolect dump always + /// + public const string CollectDumpAlwaysKey = "AlwaysCollectDump"; + + /// + /// Configuration key name for dump type + /// + public const string DumpTypeKey = "DumpType"; } } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Interfaces/IProcessDumpUtility.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Interfaces/IProcessDumpUtility.cs index 7240edd688..5aff12e962 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Interfaces/IProcessDumpUtility.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Interfaces/IProcessDumpUtility.cs @@ -27,6 +27,9 @@ public interface IProcessDumpUtility /// /// Path to TestResults directory /// - void StartProcessDump(int processId, string dumpFileGuid, string testResultsDirectory); + /// + /// Is full dump enabled + /// + void StartProcessDump(int processId, string dumpFileGuid, string testResultsDirectory, bool isFullDump = false); } } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs index 34388a84b1..56ef19d6d4 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs @@ -71,14 +71,14 @@ public string GetDumpFile() } /// - public void StartProcessDump(int processId, string dumpFileGuid, string testResultsDirectory) + public void StartProcessDump(int processId, string dumpFileGuid, string testResultsDirectory, bool isFullDump = false) { this.dumpFileName = $"{this.processHelper.GetProcessName(processId)}_{processId}_{dumpFileGuid}"; this.testResultsDirectory = testResultsDirectory; this.procDumpProcess = this.processHelper.LaunchProcess( this.GetProcDumpExecutable(), - ProcessDumpUtility.BuildProcDumpArgs(processId, this.dumpFileName), + ProcessDumpUtility.BuildProcDumpArgs(processId, this.dumpFileName, isFullDump), testResultsDirectory, null, null, @@ -94,13 +94,24 @@ public void StartProcessDump(int processId, string dumpFileGuid, string testResu /// /// Filename for dump file /// + /// + /// Is full dump enabled + /// /// Arguments - private static string BuildProcDumpArgs(int processId, string filename) + private static string BuildProcDumpArgs(int processId, string filename, bool isFullDump = false) { // -accepteula: Auto accept end-user license agreement // -t: Write a dump when the process terminates. - // This will create a minidump of the process with specified filename - return "-accepteula -t " + processId + " " + filename + ".dmp"; + if (isFullDump) + { + // This will create a fulldump of the process with specified filename + return "-accepteula -t -ma " + processId + " " + filename + ".dmp"; + } + else + { + // This will create a minidump of the process with specified filename + return "-accepteula -t " + processId + " " + filename + ".dmp"; + } } /// diff --git a/src/Microsoft.TestPlatform.ObjectModel/Constants.cs b/src/Microsoft.TestPlatform.ObjectModel/Constants.cs index edb2d4d7c3..47cc3cb9b0 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Constants.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Constants.cs @@ -35,6 +35,11 @@ public static class Constants /// public const string BlameCollectDumpKey = "CollectDump"; + /// + /// Name of collect dump option for blame. + /// + public const string BlameCollectDumpOnlyOnAbortKey = "CollectDumpOnlyOnAbort"; + /// /// Name of data collection settings node in RunSettings. /// diff --git a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs index 32a42ad4e3..b1445cf2e4 100644 --- a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs @@ -4,18 +4,21 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors { using System; + using System.Collections.Generic; using System.Xml; - using CommandLineResources = Microsoft.VisualStudio.TestPlatform.CommandLine.Resources.Resources; + using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.Utilities; using Microsoft.VisualStudio.TestPlatform.Common; using Microsoft.VisualStudio.TestPlatform.Common.Interfaces; using Microsoft.VisualStudio.TestPlatform.Common.Utilities; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities; - using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces; using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions; + using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces; using Microsoft.VisualStudio.TestPlatform.Utilities; + using CommandLineResources = Microsoft.VisualStudio.TestPlatform.CommandLine.Resources.Resources; + internal class EnableBlameArgumentProcessor : IArgumentProcessor { /// @@ -30,7 +33,7 @@ internal class EnableBlameArgumentProcessor : IArgumentProcessor /// /// Initializes a new instance of the class. /// - public EnableBlameArgumentProcessor() + public EnableBlameArgumentProcessor() { } @@ -133,7 +136,8 @@ public void Initialize(string argument) { bool isDumpEnabled = false; - if (!string.IsNullOrWhiteSpace(argument) && argument.Equals(Constants.BlameCollectDumpKey, StringComparison.OrdinalIgnoreCase)) + var parseSucceeded = LoggerUtilities.TryParseLoggerArgument(argument, out string loggerIdentifier, out Dictionary parameters); + if (parseSucceeded && loggerIdentifier.Equals(Constants.BlameCollectDumpKey, StringComparison.OrdinalIgnoreCase)) { if (this.environment.OperatingSystem == PlatformOperatingSystem.Windows && this.environment.Architecture != PlatformArchitecture.ARM64 && @@ -195,12 +199,21 @@ public void Initialize(string argument) if (isDumpEnabled) { var dumpNode = XmlDocument.CreateElement(Constants.BlameCollectDumpKey); + if (parameters != null && parameters.Count > 0) + { + foreach (KeyValuePair entry in parameters) + { + var attribute = XmlDocument.CreateAttribute(entry.Key); + attribute.Value = entry.Value; + dumpNode.Attributes.Append(attribute); + } + } outernode.AppendChild(dumpNode); } foreach (var item in dataCollectionRunSettings.DataCollectorSettingsList) { - if( item.FriendlyName.Equals(BlameFriendlyName)) + if (item.FriendlyName.Equals(BlameFriendlyName)) { item.Configuration = outernode; } diff --git a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs index 3bd9849e9f..1c66c1b757 100644 --- a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs @@ -63,14 +63,14 @@ public BlameCollectorTests() public void InitializeShouldThrowExceptionIfDataCollectionLoggerIsNull() { Assert.ThrowsException(() => - { - this.blameDataCollector.Initialize( - this.configurationElement, - this.mockDataColectionEvents.Object, - this.mockDataCollectionSink.Object, - null, - null); - }); + { + this.blameDataCollector.Initialize( + this.configurationElement, + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + null, + null); + }); } /// @@ -142,6 +142,63 @@ public void TriggerSessionEndedHandlerShouldGetDumpFileIfProcDumpEnabled() // Setup this.mockProcessDumpUtility.Setup(x => x.GetDumpFile()).Returns(this.filepath); + this.mockBlameReaderWriter.Setup(x => x.WriteTestSequence(It.IsAny>(), It.IsAny())) + .Returns(this.filepath); + + // Raise + this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + this.mockDataColectionEvents.Raise(x => x.TestCaseStart += null, new TestCaseStartEventArgs(new TestCase())); + this.mockDataColectionEvents.Raise(x => x.SessionEnd += null, new SessionEndEventArgs(this.dataCollectionContext)); + + // Verify GetDumpFiles Call + this.mockProcessDumpUtility.Verify(x => x.GetDumpFile(), Times.Once); + } + + /// + /// The trigger session ended handler should not dump files if proc dump was enabled and test host did not crash + /// + [TestMethod] + public void TriggerSessionEndedHandlerShouldNotGetDumpFileIfNoCrash() + { + // Initializing Blame Data Collector + this.blameDataCollector.Initialize( + this.GetDumpConfigurationElement(), + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + this.mockLogger.Object, + this.context); + + // Setup + this.mockProcessDumpUtility.Setup(x => x.GetDumpFile()).Returns(this.filepath); + this.mockBlameReaderWriter.Setup(x => x.WriteTestSequence(It.IsAny>(), It.IsAny())) + .Returns(this.filepath); + + // Raise + this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + this.mockDataColectionEvents.Raise(x => x.SessionEnd += null, new SessionEndEventArgs(this.dataCollectionContext)); + + // Verify GetDumpFiles Call + this.mockProcessDumpUtility.Verify(x => x.GetDumpFile(), Times.Never); + } + + /// + /// The trigger session ended handler should get dump files if collect dump always was enabled irrespective of completed test case count + /// + [TestMethod] + public void TriggerSessionEndedHandlerShouldGetDumpFileIfCollectDumpAlwaysIsEnabled() + { + // Initializing Blame Data Collector + this.blameDataCollector.Initialize( + this.GetDumpConfigurationElement(alwaysCollectDump: true), + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + this.mockLogger.Object, + this.context); + + // Setup + this.mockProcessDumpUtility.Setup(x => x.GetDumpFile()).Returns(this.filepath); + this.mockBlameReaderWriter.Setup(x => x.WriteTestSequence(It.IsAny>(), It.IsAny())) + .Returns(this.filepath); // Raise this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); @@ -166,8 +223,11 @@ public void TriggerSessionEndedHandlerShouldLogWarningIfGetDumpFileThrowsFileNot this.context); // Setup and raise events + this.mockBlameReaderWriter.Setup(x => x.WriteTestSequence(It.IsAny>(), It.IsAny())) + .Returns(this.filepath); this.mockProcessDumpUtility.Setup(x => x.GetDumpFile()).Throws(new FileNotFoundException()); this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + this.mockDataColectionEvents.Raise(x => x.TestCaseStart += null, new TestCaseStartEventArgs(new TestCase())); this.mockDataColectionEvents.Raise(x => x.SessionEnd += null, new SessionEndEventArgs(this.dataCollectionContext)); // Verify GetDumpFiles Call @@ -192,7 +252,28 @@ public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityIfProcDumpEn this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); // Verify StartProcessDumpCall - this.mockProcessDumpUtility.Verify(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny())); + this.mockProcessDumpUtility.Verify(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny(), false)); + } + + /// + /// The trigger test host launched handler should start process dump utility for full dump if full dump was enabled + /// + [TestMethod] + public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityForFullDumpIfFullDumpEnabled() + { + // Initializing Blame Data Collector + this.blameDataCollector.Initialize( + this.GetDumpConfigurationElement(isFullDump: true), + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + this.mockLogger.Object, + this.context); + + // Raise TestHostLaunched + this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + + // Verify StartProcessDumpCall + this.mockProcessDumpUtility.Verify(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny(), true)); } /// @@ -211,7 +292,7 @@ public void TriggerTestHostLaunchedHandlerShouldCatchTestPlatFormExceptionsAndRe // Make StartProcessDump throw exception var tpex = new TestPlatformException("env var exception"); - this.mockProcessDumpUtility.Setup(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny())) + this.mockProcessDumpUtility.Setup(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny(), false)) .Throws(tpex); // Raise TestHostLaunched @@ -237,7 +318,7 @@ public void TriggerTestHostLaunchedHandlerShouldCatchAllUnexpectedExceptionsAndR // Make StartProcessDump throw exception var ex = new Exception("start process failed"); - this.mockProcessDumpUtility.Setup(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny())) + this.mockProcessDumpUtility.Setup(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny(), false)) .Throws(ex); // Raise TestHostLaunched @@ -253,13 +334,26 @@ public void CleanUp() File.Delete(this.filepath); } - private XmlElement GetDumpConfigurationElement() + private XmlElement GetDumpConfigurationElement(bool isFullDump = false, bool alwaysCollectDump = false) { var xmldoc = new XmlDocument(); var outernode = xmldoc.CreateElement("Configuration"); var node = xmldoc.CreateElement(BlameDataCollector.Constants.DumpModeKey); outernode.AppendChild(node); node.InnerText = "Text"; + if (isFullDump) + { + var fulldumpAttribute = xmldoc.CreateAttribute(BlameDataCollector.Constants.DumpTypeKey); + fulldumpAttribute.Value = "full"; + node.Attributes.Append(fulldumpAttribute); + } + + if (alwaysCollectDump) + { + var fulldumpAttribute = xmldoc.CreateAttribute(BlameDataCollector.Constants.CollectDumpAlwaysKey); + fulldumpAttribute.Value = "true"; + node.Attributes.Append(fulldumpAttribute); + } return outernode; } diff --git a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/ProcessDumpUtilityTests.cs b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/ProcessDumpUtilityTests.cs index 57fa1d51fe..ae63dc5e09 100644 --- a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/ProcessDumpUtilityTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/ProcessDumpUtilityTests.cs @@ -123,6 +123,34 @@ public void StartProcessDumpWillStartProcDumpExeWithCorrectParamsAndGetDumpFileR Assert.AreEqual(Path.Combine(testResultsDirectory, filename), processDumpUtility.GetDumpFile()); } + /// + /// StartProcessDump should start procdump binary with correct full dump arguments, while GetDumpFile returns full path + /// + [TestMethod] + public void StartProcessDumpWillStartProcDumpExeWithCorrectParamsForFullDump() + { + var guid = "guid"; + var process = "process"; + var processId = 12345; + var filename = $"{process}_{processId}_{guid}.dmp"; + var args = $"-accepteula -t -ma {processId} {filename}"; + var testResultsDirectory = "D:\\TestResults"; + + this.mockProcessHelper.Setup(x => x.LaunchProcess(It.IsAny(), It.IsAny(), It.IsAny(), null, null, null)) + .Returns(this.mockProcDumpProcess.Object); + this.mockProcessHelper.Setup(x => x.GetProcessName(processId)) + .Returns(process); + + this.mockFileHelper.Setup(x => x.GetFiles(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(new string[] { Path.Combine(testResultsDirectory, filename) }); + + var processDumpUtility = new ProcessDumpUtility(this.mockProcessHelper.Object, this.mockFileHelper.Object, this.mockPlatformEnvironment.Object); + processDumpUtility.StartProcessDump(processId, guid, testResultsDirectory, isFullDump: true); + + this.mockProcessHelper.Verify(x => x.LaunchProcess(It.IsAny(), args, It.IsAny(), null, null, null), Times.Once); + Assert.AreEqual(Path.Combine(testResultsDirectory, filename), processDumpUtility.GetDumpFile()); + } + /// /// Start process dump will throw error if PROCDUMP_PATH env variable is not set /// From 08d56e1a1aab80f24cad017655f221293835b635 Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Wed, 11 Jul 2018 17:21:56 +0530 Subject: [PATCH 02/10] PR comments --- .../BlameCollector.cs | 9 ++++--- .../Constants.cs | 4 +-- .../EnableBlameArgumentProcessor.cs | 27 +++++++++++-------- .../EnableBlameArgumentProcessorTests.cs | 19 +++++++++++++ 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs index 7b6fab127a..4ba96a80aa 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs @@ -30,7 +30,7 @@ public class BlameCollector : DataCollector, ITestExecutionEnvironmentSpecifier private int testStartCount; private int testEndCount; private bool processDumpEnabled; - private bool alwaysCollectProcessDump; + private bool collectDumpOnProcessExit; private bool processFullDumpEnabled; private string attachmentGuid; @@ -103,7 +103,7 @@ public override void Initialize( this.processDumpEnabled = collectDumpNode != null; if (this.processDumpEnabled) { - this.alwaysCollectProcessDump = string.Equals(collectDumpNode.Attributes[Constants.CollectDumpAlwaysKey]?.Value, "true", StringComparison.OrdinalIgnoreCase); + this.collectDumpOnProcessExit = string.Equals(collectDumpNode.Attributes[Constants.CollectDumpAlwaysKey]?.Value, "true", StringComparison.OrdinalIgnoreCase); this.processFullDumpEnabled = string.Equals(collectDumpNode.Attributes[Constants.DumpTypeKey]?.Value, "full", StringComparison.OrdinalIgnoreCase); } } @@ -167,7 +167,8 @@ private void SessionEnded_Handler(object sender, SessionEndEventArgs args) if (this.processDumpEnabled) { - if (this.testStartCount > this.testEndCount || this.alwaysCollectProcessDump) + // If there was a test case crash or if we need to collect dump on process exit. + if (this.testStartCount > this.testEndCount || this.collectDumpOnProcessExit) { try { @@ -180,10 +181,12 @@ private void SessionEnded_Handler(object sender, SessionEndEventArgs args) else { EqtTrace.Warning("BlameCollector.SessionEnded_Handler: blame:CollectDump was enabled but dump file was not generated."); + this.logger.LogWarning(args.Context, "BlameCollector.SessionEnded_Handler: blame:CollectDump was enabled but dump file was not generated."); } } catch (FileNotFoundException ex) { + EqtTrace.Warning(ex.Message); this.logger.LogWarning(args.Context, ex.Message); } } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs index 76f7ab32c3..b264a5ddfc 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs @@ -44,9 +44,9 @@ internal static class Constants public const string DumpModeKey = "CollectDump"; /// - /// Configuration key name for coolect dump always + /// Configuration key name for collect dump always /// - public const string CollectDumpAlwaysKey = "AlwaysCollectDump"; + public const string CollectDumpAlwaysKey = "CollectDumpOnProcessExit"; /// /// Configuration key name for dump type diff --git a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs index b1445cf2e4..60b354d923 100644 --- a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs @@ -198,17 +198,7 @@ public void Initialize(string argument) if (isDumpEnabled) { - var dumpNode = XmlDocument.CreateElement(Constants.BlameCollectDumpKey); - if (parameters != null && parameters.Count > 0) - { - foreach (KeyValuePair entry in parameters) - { - var attribute = XmlDocument.CreateAttribute(entry.Key); - attribute.Value = entry.Value; - dumpNode.Attributes.Append(attribute); - } - } - outernode.AppendChild(dumpNode); + AddCollectDumpNode(parameters, XmlDocument, outernode); } foreach (var item in dataCollectionRunSettings.DataCollectorSettingsList) @@ -222,6 +212,21 @@ public void Initialize(string argument) runSettingsManager.UpdateRunSettingsNodeInnerXml(Constants.DataCollectionRunSettingsName, dataCollectionRunSettings.ToXml().InnerXml); } + private static void AddCollectDumpNode(Dictionary parameters, XmlDocument XmlDocument, XmlElement outernode) + { + var dumpNode = XmlDocument.CreateElement(Constants.BlameCollectDumpKey); + if (parameters != null && parameters.Count > 0) + { + foreach (KeyValuePair entry in parameters) + { + var attribute = XmlDocument.CreateAttribute(entry.Key); + attribute.Value = entry.Value; + dumpNode.Attributes.Append(attribute); + } + } + outernode.AppendChild(dumpNode); + } + /// /// Executes the argument processor. /// diff --git a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs index c2edc7b7e5..d209f8f7da 100644 --- a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs @@ -125,6 +125,25 @@ public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpEntryIfEnable Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); } + [TestMethod] + public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpParametersIfEnabled() + { + var runsettingsString = string.Format(DefaultRunSettings, ""); + var runsettings = new RunSettings(); + runsettings.LoadSettingsXml(DefaultRunSettings); + this.settingsProvider.SetActiveRunSettings(runsettings); + + this.mockEnvronment.Setup(x => x.OperatingSystem) + .Returns(PlatformOperatingSystem.Windows); + this.mockEnvronment.Setup(x => x.Architecture) + .Returns(PlatformArchitecture.X64); + + this.executor.Initialize("CollectDump;DumpType=full;CollectDumpOnProcessExit=true"); + + Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + } + internal class TestableEnableBlameArgumentExecutor : EnableBlameArgumentExecutor { internal TestableEnableBlameArgumentExecutor(IRunSettingsProvider runSettingsManager, IEnvironment environment, IOutput output) From 6e33e89b56c2adaf1294e6b98f26aa573ccddb9c Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Mon, 16 Jul 2018 17:31:46 +0530 Subject: [PATCH 03/10] PR comments --- .../BlameCollector.cs | 2 +- .../Constants.cs | 2 +- .../Constants.cs | 7 +- .../EnableBlameArgumentProcessor.cs | 44 +++++++- .../Resources/Resources.Designer.cs | 32 ++++++ src/vstest.console/Resources/Resources.resx | 9 ++ .../Resources/xlf/Resources.cs.xlf | 15 +++ .../Resources/xlf/Resources.de.xlf | 15 +++ .../Resources/xlf/Resources.es.xlf | 15 +++ .../Resources/xlf/Resources.fr.xlf | 15 +++ .../Resources/xlf/Resources.it.xlf | 15 +++ .../Resources/xlf/Resources.ja.xlf | 15 +++ .../Resources/xlf/Resources.ko.xlf | 15 +++ .../Resources/xlf/Resources.pl.xlf | 15 +++ .../Resources/xlf/Resources.pt-BR.xlf | 15 +++ .../Resources/xlf/Resources.ru.xlf | 15 +++ .../Resources/xlf/Resources.tr.xlf | 15 +++ .../Resources/xlf/Resources.xlf | 15 +++ .../Resources/xlf/Resources.zh-Hans.xlf | 15 +++ .../Resources/xlf/Resources.zh-Hant.xlf | 15 +++ .../BlameCollectorTests.cs | 41 +++++-- .../EnableBlameArgumentProcessorTests.cs | 101 +++++++++++++++++- 22 files changed, 435 insertions(+), 13 deletions(-) diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs index 4ba96a80aa..4267419665 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs @@ -103,7 +103,7 @@ public override void Initialize( this.processDumpEnabled = collectDumpNode != null; if (this.processDumpEnabled) { - this.collectDumpOnProcessExit = string.Equals(collectDumpNode.Attributes[Constants.CollectDumpAlwaysKey]?.Value, "true", StringComparison.OrdinalIgnoreCase); + this.collectDumpOnProcessExit = string.Equals(collectDumpNode.Attributes[Constants.CollectDumpOnProcessExitKey]?.Value, "true", StringComparison.OrdinalIgnoreCase); this.processFullDumpEnabled = string.Equals(collectDumpNode.Attributes[Constants.DumpTypeKey]?.Value, "full", StringComparison.OrdinalIgnoreCase); } } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs index b264a5ddfc..ebfa66cc11 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs @@ -46,7 +46,7 @@ internal static class Constants /// /// Configuration key name for collect dump always /// - public const string CollectDumpAlwaysKey = "CollectDumpOnProcessExit"; + public const string CollectDumpOnProcessExitKey = "CollectDumpOnProcessExit"; /// /// Configuration key name for dump type diff --git a/src/Microsoft.TestPlatform.ObjectModel/Constants.cs b/src/Microsoft.TestPlatform.ObjectModel/Constants.cs index 47cc3cb9b0..1a1da15bdd 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Constants.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Constants.cs @@ -38,7 +38,12 @@ public static class Constants /// /// Name of collect dump option for blame. /// - public const string BlameCollectDumpOnlyOnAbortKey = "CollectDumpOnlyOnAbort"; + public const string BlameDumpTypeKey = "DumpType"; + + /// + /// Name of collect dump option for blame. + /// + public const string BlameCollectDumpOnProcessExitKey = "CollectDumpOnProcessExit"; /// /// Name of data collection settings node in RunSettings. diff --git a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs index 60b354d923..7e7268fe16 100644 --- a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs @@ -5,6 +5,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors { using System; using System.Collections.Generic; + using System.Globalization; using System.Xml; using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.Utilities; @@ -150,6 +151,10 @@ public void Initialize(string argument) Output.Warning(false, CommandLineResources.BlameCollectDumpNotSupportedForPlatform); } } + else + { + Output.Warning(false, CommandLineResources.BlameIncorrectParameters); + } // Add Blame Logger EnableLoggerArgumentExecutor.AddLoggerToRunSettings(BlameFriendlyName, this.runSettingsManager); @@ -212,15 +217,48 @@ public void Initialize(string argument) runSettingsManager.UpdateRunSettingsNodeInnerXml(Constants.DataCollectionRunSettingsName, dataCollectionRunSettings.ToXml().InnerXml); } - private static void AddCollectDumpNode(Dictionary parameters, XmlDocument XmlDocument, XmlElement outernode) + private void AddCollectDumpNode(Dictionary parameters, XmlDocument XmlDocument, XmlElement outernode) { var dumpNode = XmlDocument.CreateElement(Constants.BlameCollectDumpKey); if (parameters != null && parameters.Count > 0) { foreach (KeyValuePair entry in parameters) { - var attribute = XmlDocument.CreateAttribute(entry.Key); - attribute.Value = entry.Value; + string attributeKey = null; + string attributeValue = null; + if (string.Equals(entry.Key, Constants.BlameCollectDumpOnProcessExitKey, StringComparison.OrdinalIgnoreCase)) + { + attributeKey = Constants.BlameCollectDumpOnProcessExitKey; + if(string.Equals(entry.Value, "true", StringComparison.OrdinalIgnoreCase) || string.Equals(entry.Value, "false", StringComparison.OrdinalIgnoreCase)) + { + attributeValue = entry.Value; + } + else + { + Output.Warning(false, String.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameParameterValueIncorrect, entry.Key, "true", "false")); + continue; + } + } + else if (string.Equals(entry.Key, Constants.BlameDumpTypeKey, StringComparison.OrdinalIgnoreCase)) + { + attributeKey = Constants.BlameDumpTypeKey; + if (string.Equals(entry.Value, "full", StringComparison.OrdinalIgnoreCase) || string.Equals(entry.Value, "mini", StringComparison.OrdinalIgnoreCase)) + { + attributeValue = entry.Value; + } + else + { + Output.Warning(false, String.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameParameterValueIncorrect, entry.Key, "mini", "full")); + continue; + } + } + else + { + Output.Warning(false, String.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameParameterKeyIncorrect, entry.Key)); + continue; + } + var attribute = XmlDocument.CreateAttribute(attributeKey); + attribute.Value = attributeValue; dumpNode.Attributes.Append(attribute); } } diff --git a/src/vstest.console/Resources/Resources.Designer.cs b/src/vstest.console/Resources/Resources.Designer.cs index 6043c954e7..8dc3f27eb9 100644 --- a/src/vstest.console/Resources/Resources.Designer.cs +++ b/src/vstest.console/Resources/Resources.Designer.cs @@ -235,6 +235,38 @@ public static string BlameCollectDumpNotSupportedForPlatform } } + /// + /// The options specified with /blame is incorrect, it will be ignored. + /// + public static string BlameIncorrectParameters + { + get + { + return ResourceManager.GetString("BlameIncorrectParameters", resourceCulture); + } + } + + /// + /// The blame parameter {0} is not valid. Ignoring this parameter. + /// + public static string BlameParameterKeyIncorrect + { + get + { + return ResourceManager.GetString("BlameParameterKeyIncorrect", resourceCulture); + } + } + + /// + /// The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + /// + public static string BlameParameterValueIncorrect + { + get + { + return ResourceManager.GetString("BlameParameterValueIncorrect", resourceCulture); + } + } /// /// Looks up a localized string similar to --BuildBasePath|/BuildBasePath:<BuildBasePath> /// The directory containing the temporary outputs.. diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index b0474546c0..dd71dcd737 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -686,4 +686,13 @@ Example: /logger:console;prefix=<Defaults to "false"> More info on Console Logger here : https://aka.ms/console-logger + + The options specified with /blame is incorrect, it will be ignored. + + + The blame parameter {0} is not valid. Ignoring this parameter. + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index 7e0b81b9d4..effa5fb6e8 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1579,6 +1579,21 @@ Možnost CollectDump pro Blame není pro tuto platformu podporovaná. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 5552a47b5f..4019860f70 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1579,6 +1579,21 @@ Die CollectDump-Option für Blame wird für diese Plattform nicht unterstützt. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 cff5994979..3a266524ba 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1584,6 +1584,21 @@ No se admite la opción CollectDump para Blame en esta plataforma. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 bdc627129e..49280ca1ee 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1579,6 +1579,21 @@ L'option CollectDump pour Blame n'est pas prise en charge pour cette plateforme. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 4564266cbf..b1bced9137 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1579,6 +1579,21 @@ L'opzione CollectDump per Blame non è supportata per questa piattaforma. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 003034bcc9..ae89e52847 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1579,6 +1579,21 @@ このプラットフォームでは、Blame の CollectDump オプションはサポートされていません。 + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 0a8462e503..b9feb01ca4 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1579,6 +1579,21 @@ Blame에 대한 CollectDump 옵션이 이 플랫폼에서 지원되지 않습니다. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 12931af6d2..c424cca90e 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1577,6 +1577,21 @@ Opcja CollectDump dla narzędzia Blame nie jest obsługiwana na tej platformie. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 2b27ac4c3d..f6d5a6ead1 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1577,6 +1577,21 @@ A opção CollectDump para Blame não é compatível com esta plataforma. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 66b8ffde4d..e226b46f8f 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1579,6 +1579,21 @@ Параметр CollectDump для Blame не поддерживается на этой платформе. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 6abe9d22c4..c72166660e 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1579,6 +1579,21 @@ Blame için CollectDump seçeneği bu platformda desteklenmez. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 08b70745ed..555825f2b9 100644 --- a/src/vstest.console/Resources/xlf/Resources.xlf +++ b/src/vstest.console/Resources/xlf/Resources.xlf @@ -775,6 +775,21 @@ CollectDump option for Blame is not supported for this platform. + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 c4b72f72ee..2f26edc9d3 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1579,6 +1579,21 @@ 此平台不支持用于追责的 CollectDump 选项。 + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ 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 bf7c97abba..c5b65c0d3b 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1579,6 +1579,21 @@ 對此平台不支援 Blame 的 CollectDump 選項。 + + The options specified with /blame is incorrect, it will be ignored. + The options specified with /blame is incorrect, it will be ignored. + + + + The blame parameter {0} is not valid. Ignoring this parameter. + The blame parameter {0} is not valid. Ignoring this parameter. + + + + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs index 1c66c1b757..1ba80a44e3 100644 --- a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs @@ -182,14 +182,14 @@ public void TriggerSessionEndedHandlerShouldNotGetDumpFileIfNoCrash() } /// - /// The trigger session ended handler should get dump files if collect dump always was enabled irrespective of completed test case count + /// The trigger session ended handler should get dump files if collect dump on exit was enabled irrespective of completed test case count /// [TestMethod] - public void TriggerSessionEndedHandlerShouldGetDumpFileIfCollectDumpAlwaysIsEnabled() + public void TriggerSessionEndedHandlerShouldGetDumpFileIfCollectDumpOnExitIsEnabled() { // Initializing Blame Data Collector this.blameDataCollector.Initialize( - this.GetDumpConfigurationElement(alwaysCollectDump: true), + this.GetDumpConfigurationElement(collectDumpOnExit: true), this.mockDataColectionEvents.Object, this.mockDataCollectionSink.Object, this.mockLogger.Object, @@ -276,6 +276,35 @@ public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityForFullDumpI this.mockProcessDumpUtility.Verify(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny(), true)); } + /// + /// The trigger test host launched handler should start process dump utility for full dump if full dump was enabled + /// + [TestMethod] + public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityForFullDumpIfFullDumpEnabledCaseSensitivity() + { + var dumpConfig = this.GetDumpConfigurationElement(); + var dumpTypeAttribute = dumpConfig.OwnerDocument.CreateAttribute("DumpType"); + dumpTypeAttribute.Value = "FuLl"; + dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpTypeAttribute); + var dumpOnExitAttribute = dumpConfig.OwnerDocument.CreateAttribute("CollectDumpOnProcessExit"); + dumpOnExitAttribute.Value = "FaLSe"; + dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpOnExitAttribute); + + // Initializing Blame Data Collector + this.blameDataCollector.Initialize( + dumpConfig, + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + this.mockLogger.Object, + this.context); + + // Raise TestHostLaunched + this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + + // Verify StartProcessDumpCall + this.mockProcessDumpUtility.Verify(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny(), true)); + } + /// /// The trigger test host launcehd handler should not break if start process dump throws TestPlatFormExceptions and log error message /// @@ -334,7 +363,7 @@ public void CleanUp() File.Delete(this.filepath); } - private XmlElement GetDumpConfigurationElement(bool isFullDump = false, bool alwaysCollectDump = false) + private XmlElement GetDumpConfigurationElement(bool isFullDump = false, bool collectDumpOnExit = false) { var xmldoc = new XmlDocument(); var outernode = xmldoc.CreateElement("Configuration"); @@ -348,9 +377,9 @@ private XmlElement GetDumpConfigurationElement(bool isFullDump = false, bool alw node.Attributes.Append(fulldumpAttribute); } - if (alwaysCollectDump) + if (collectDumpOnExit) { - var fulldumpAttribute = xmldoc.CreateAttribute(BlameDataCollector.Constants.CollectDumpAlwaysKey); + var fulldumpAttribute = xmldoc.CreateAttribute(BlameDataCollector.Constants.CollectDumpOnProcessExitKey); fulldumpAttribute.Value = "true"; node.Attributes.Append(fulldumpAttribute); } diff --git a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs index d209f8f7da..48f6e1abc7 100644 --- a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs @@ -92,7 +92,7 @@ public void InitializeShouldWarnIfPlatformNotSupportedForCollectDumpOption() Tuple.Create(PlatformOperatingSystem.Windows, PlatformArchitecture.ARM), Tuple.Create(PlatformOperatingSystem.Windows, PlatformArchitecture.ARM64) }; - + foreach (var tuple in unsupportedPlatforms) { this.mockEnvronment.SetupGet(s => s.OperatingSystem).Returns(tuple.Item1); @@ -106,6 +106,86 @@ public void InitializeShouldWarnIfPlatformNotSupportedForCollectDumpOption() } } + [TestMethod] + public void InitializeShouldWarnIfIncorrectorParameterIsSpecifiedForCollectDumpOption() + { + var runsettingsString = string.Format(DefaultRunSettings, ""); + var runsettings = new RunSettings(); + runsettings.LoadSettingsXml(DefaultRunSettings); + this.settingsProvider.SetActiveRunSettings(runsettings); + + this.mockEnvronment.Setup(x => x.OperatingSystem) + .Returns(PlatformOperatingSystem.Windows); + this.mockEnvronment.Setup(x => x.Architecture) + .Returns(PlatformArchitecture.X64); + + this.executor.Initialize("CollectDumpXX"); + this.mockOutput.Verify(x => x.WriteLine(CommandLineResources.BlameIncorrectParameters, OutputLevel.Warning)); + + Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + } + + [TestMethod] + public void InitializeShouldWarnIfInvalidKeysAreSpecifiedForCollectDumpOption() + { + var runsettingsString = string.Format(DefaultRunSettings, ""); + var runsettings = new RunSettings(); + runsettings.LoadSettingsXml(DefaultRunSettings); + this.settingsProvider.SetActiveRunSettings(runsettings); + + this.mockEnvronment.Setup(x => x.OperatingSystem) + .Returns(PlatformOperatingSystem.Windows); + this.mockEnvronment.Setup(x => x.Architecture) + .Returns(PlatformArchitecture.X64); + + this.executor.Initialize("CollectDump;Key=value"); + this.mockOutput.Verify(x => x.WriteLine(string.Format(CommandLineResources.BlameParameterKeyIncorrect, "Key"), OutputLevel.Warning)); + + Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + } + + [TestMethod] + public void InitializeShouldWarnIfInvalidValuesAreSpecifiedForCollectDumpOption() + { + var runsettingsString = string.Format(DefaultRunSettings, ""); + var runsettings = new RunSettings(); + runsettings.LoadSettingsXml(DefaultRunSettings); + this.settingsProvider.SetActiveRunSettings(runsettings); + + this.mockEnvronment.Setup(x => x.OperatingSystem) + .Returns(PlatformOperatingSystem.Windows); + this.mockEnvronment.Setup(x => x.Architecture) + .Returns(PlatformArchitecture.X64); + + this.executor.Initialize("CollectDump;CollectDumpOnProcessExit=asd"); + this.mockOutput.Verify(x => x.WriteLine(string.Format(CommandLineResources.BlameParameterValueIncorrect, "CollectDumpOnProcessExit", "true", "false") , OutputLevel.Warning)); + + Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + } + + [TestMethod] + public void InitializeShouldWarnIfInvalidParameterFormatIsSpecifiedForCollectDumpOption() + { + var runsettingsString = string.Format(DefaultRunSettings, ""); + var runsettings = new RunSettings(); + runsettings.LoadSettingsXml(DefaultRunSettings); + this.settingsProvider.SetActiveRunSettings(runsettings); + + this.mockEnvronment.Setup(x => x.OperatingSystem) + .Returns(PlatformOperatingSystem.Windows); + this.mockEnvronment.Setup(x => x.Architecture) + .Returns(PlatformArchitecture.X64); + + this.executor.Initialize("CollectDump;sdf=sdg;;as;a="); + this.mockOutput.Verify(x => x.WriteLine(CommandLineResources.BlameIncorrectParameters, OutputLevel.Warning)); + + Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + } + [TestMethod] public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpEntryIfEnabled() { @@ -144,6 +224,25 @@ public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpParametersIfE Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); } + [TestMethod] + public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpParametersCaseInsensitively() + { + var runsettingsString = string.Format(DefaultRunSettings, ""); + var runsettings = new RunSettings(); + runsettings.LoadSettingsXml(DefaultRunSettings); + this.settingsProvider.SetActiveRunSettings(runsettings); + + this.mockEnvronment.Setup(x => x.OperatingSystem) + .Returns(PlatformOperatingSystem.Windows); + this.mockEnvronment.Setup(x => x.Architecture) + .Returns(PlatformArchitecture.X64); + + this.executor.Initialize("CollectDump;DUmpTYpe=full;CollectDUMPOnProcessExit=true"); + + Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + } + internal class TestableEnableBlameArgumentExecutor : EnableBlameArgumentExecutor { internal TestableEnableBlameArgumentExecutor(IRunSettingsProvider runSettingsManager, IEnvironment environment, IOutput output) From a2df30da8122fd847c229b12e752b0a67221405b Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Mon, 16 Jul 2018 17:50:13 +0530 Subject: [PATCH 04/10] Fixing help text --- src/vstest.console/Resources/Resources.resx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index dd71dcd737..cb0de2c0f3 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -647,8 +647,16 @@ Read response file for more options. - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit use key (true/false) + DumpType - To collect full dump use key DumpType (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full Test Run Aborted. From 8570979f37de12a24719146ce563c615ed84cee9 Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Mon, 16 Jul 2018 17:56:50 +0530 Subject: [PATCH 05/10] Help text --- src/vstest.console/Resources/Resources.resx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index cb0de2c0f3..71f23efc73 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -649,11 +649,13 @@ --Blame|/Blame:[CollectDump];[Key]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. - It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - You may optionally choose to collect process dump for the test host. By default, a mini dump will be collected on a crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit use key (true/false) - DumpType - To collect full dump use key DumpType (mini/full) + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) Example: /Blame /Blame:CollectDump /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full From 15d72a1070487c7b9b47cf2b3010f2c04520c31d Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Wed, 18 Jul 2018 17:15:01 +0530 Subject: [PATCH 06/10] Making read on binary reader thread safe --- .../SocketCommunicationManager.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs index 093a19b7d2..52ca4067b1 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs @@ -70,6 +70,11 @@ public class SocketCommunicationManager : ICommunicationManager /// private object sendSyncObject = new object(); + /// + /// Sync object for receiving messages + /// + private object receiveSyncObject = new object(); + private Socket socket; /// @@ -311,7 +316,11 @@ public async Task ReceiveMessageAsync(CancellationToken cancellationTok /// Raw message string public string ReceiveRawMessage() { - return this.binaryReader.ReadString(); + lock (this.receiveSyncObject) + { + // Reading message on binaryreader is not thread-Safe + return this.binaryReader.ReadString(); + } } /// From 5612d6a5a9666645e3de635dec2ad969891b4097 Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Thu, 26 Jul 2018 16:46:28 +0530 Subject: [PATCH 07/10] Refactoring --- .../SocketCommunicationManager.cs | 2 +- .../BlameCollector.cs | 40 ++++++++- .../Constants.cs | 22 ++++- .../Resources/Resources.Designer.cs | 22 +++++ .../Resources/Resources.resx | 6 ++ .../Resources/xlf/Resources.cs.xlf | 10 +++ .../Resources/xlf/Resources.de.xlf | 10 +++ .../Resources/xlf/Resources.es.xlf | 10 +++ .../Resources/xlf/Resources.fr.xlf | 10 +++ .../Resources/xlf/Resources.it.xlf | 10 +++ .../Resources/xlf/Resources.ja.xlf | 10 +++ .../Resources/xlf/Resources.ko.xlf | 10 +++ .../Resources/xlf/Resources.pl.xlf | 10 +++ .../Resources/xlf/Resources.pt-BR.xlf | 10 +++ .../Resources/xlf/Resources.ru.xlf | 10 +++ .../Resources/xlf/Resources.tr.xlf | 10 +++ .../Resources/xlf/Resources.xlf | 10 +++ .../Resources/xlf/Resources.zh-Hans.xlf | 10 +++ .../Resources/xlf/Resources.zh-Hant.xlf | 10 +++ .../EnableBlameArgumentProcessor.cs | 47 +++------- .../Resources/Resources.Designer.cs | 22 ++--- src/vstest.console/Resources/Resources.resx | 11 +-- .../Resources/xlf/Resources.cs.xlf | 35 ++++---- .../Resources/xlf/Resources.de.xlf | 35 ++++---- .../Resources/xlf/Resources.es.xlf | 35 ++++---- .../Resources/xlf/Resources.fr.xlf | 35 ++++---- .../Resources/xlf/Resources.it.xlf | 35 ++++---- .../Resources/xlf/Resources.ja.xlf | 35 ++++---- .../Resources/xlf/Resources.ko.xlf | 35 ++++---- .../Resources/xlf/Resources.pl.xlf | 35 ++++---- .../Resources/xlf/Resources.pt-BR.xlf | 35 ++++---- .../Resources/xlf/Resources.ru.xlf | 35 ++++---- .../Resources/xlf/Resources.tr.xlf | 35 ++++---- .../Resources/xlf/Resources.xlf | 31 ++++--- .../Resources/xlf/Resources.zh-Hans.xlf | 35 ++++---- .../Resources/xlf/Resources.zh-Hant.xlf | 35 ++++---- .../BlameCollectorTests.cs | 85 +++++++++++++++++- .../EnableBlameArgumentProcessorTests.cs | 86 +++++-------------- 38 files changed, 629 insertions(+), 340 deletions(-) diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs index 52ca4067b1..bc9a5b0208 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs @@ -318,7 +318,7 @@ public string ReceiveRawMessage() { lock (this.receiveSyncObject) { - // Reading message on binaryreader is not thread-Safe + // Reading message on binaryreader is not thread-safe return this.binaryReader.ReadString(); } } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs index 4267419665..31577df958 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs @@ -30,7 +30,7 @@ public class BlameCollector : DataCollector, ITestExecutionEnvironmentSpecifier private int testStartCount; private int testEndCount; private bool processDumpEnabled; - private bool collectDumpOnProcessExit; + private bool collectDumpAlways; private bool processFullDumpEnabled; private string attachmentGuid; @@ -103,14 +103,46 @@ public override void Initialize( this.processDumpEnabled = collectDumpNode != null; if (this.processDumpEnabled) { - this.collectDumpOnProcessExit = string.Equals(collectDumpNode.Attributes[Constants.CollectDumpOnProcessExitKey]?.Value, "true", StringComparison.OrdinalIgnoreCase); - this.processFullDumpEnabled = string.Equals(collectDumpNode.Attributes[Constants.DumpTypeKey]?.Value, "full", StringComparison.OrdinalIgnoreCase); + this.ValidateAndAddProcessDumpParameters(collectDumpNode); } } this.attachmentGuid = Guid.NewGuid().ToString().Replace("-", string.Empty); } + private void ValidateAndAddProcessDumpParameters(XmlElement collectDumpNode) + { + foreach (XmlAttribute attribute in collectDumpNode.Attributes) + { + if (string.Equals(attribute.Name, Constants.CollectDumpAlwaysKey, StringComparison.OrdinalIgnoreCase)) + { + if (string.Equals(attribute.Value, Constants.TrueConfigurationValue, StringComparison.OrdinalIgnoreCase) || string.Equals(attribute.Value, Constants.FalseConfigurationValue, StringComparison.OrdinalIgnoreCase)) + { + bool.TryParse(attribute.Value, out this.collectDumpAlways); + } + else + { + this.logger.LogWarning(this.context.SessionDataCollectionContext, string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterValueIncorrect, attribute.Name, Constants.TrueConfigurationValue, Constants.FalseConfigurationValue)); + } + } + else if (string.Equals(attribute.Name, Constants.DumpTypeKey, StringComparison.OrdinalIgnoreCase)) + { + if (string.Equals(attribute.Value, Constants.FullConfigurationValue, StringComparison.OrdinalIgnoreCase) || string.Equals(attribute.Value, Constants.MiniConfigurationValue, StringComparison.OrdinalIgnoreCase)) + { + this.processFullDumpEnabled = string.Equals(attribute.Value, Constants.FullConfigurationValue, StringComparison.OrdinalIgnoreCase); + } + else + { + this.logger.LogWarning(this.context.SessionDataCollectionContext, string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterValueIncorrect, attribute.Name, Constants.FullConfigurationValue, Constants.MiniConfigurationValue)); + } + } + else + { + this.logger.LogWarning(this.context.SessionDataCollectionContext, string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterKeyIncorrect, attribute.Name)); + } + } + } + /// /// Called when Test Case Start event is invoked /// @@ -168,7 +200,7 @@ private void SessionEnded_Handler(object sender, SessionEndEventArgs args) if (this.processDumpEnabled) { // If there was a test case crash or if we need to collect dump on process exit. - if (this.testStartCount > this.testEndCount || this.collectDumpOnProcessExit) + if (this.testStartCount > this.testEndCount || this.collectDumpAlways) { try { diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs index ebfa66cc11..57f9d9a3f4 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs @@ -46,11 +46,31 @@ internal static class Constants /// /// Configuration key name for collect dump always /// - public const string CollectDumpOnProcessExitKey = "CollectDumpOnProcessExit"; + public const string CollectDumpAlwaysKey = "CollectDumpOnProcessExit"; /// /// Configuration key name for dump type /// public const string DumpTypeKey = "DumpType"; + + /// + /// Configuration value for true + /// + public const string TrueConfigurationValue = "True"; + + /// + /// Configuration value for false + /// + public const string FalseConfigurationValue = "False"; + + /// + /// Configuration value for full + /// + public const string FullConfigurationValue = "Full"; + + /// + /// Configuration value for mini + /// + public const string MiniConfigurationValue = "Mini"; } } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs index d62173d17d..f02dcd2dcb 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs @@ -69,6 +69,28 @@ internal static string AbortedTestRun { } } + /// + /// The blame parameter key {0} is not valid. Ignoring this parameter. + /// + internal static string BlameParameterKeyIncorrect + { + get + { + return ResourceManager.GetString("BlameParameterKeyIncorrect", resourceCulture); + } + } + + /// + /// The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + /// + internal static string BlameParameterValueIncorrect + { + get + { + return ResourceManager.GetString("BlameParameterValueIncorrect", resourceCulture); + } + } + /// /// Looks up a localized string similar to Required environment variable PROCDUMP_PATH was null or empty. Set PROCDUMP_PATH to path of folder containing appropriate procdump executable. /// diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx index 8264dc43a3..c9e91b7659 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx @@ -120,6 +120,12 @@ The active Test Run was aborted because the host process exited unexpectedly while executing following test(s): + + The blame parameter key {0} is not valid. Ignoring this parameter. + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + Collect dump was enabled but no dump file was generated. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf index 3d9d7d20e5..6e67bfb5bf 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf @@ -35,6 +35,16 @@ Bylo povoleno shromáždění výpisu, ale nebyl vygenerován žádný soubor výpisu. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf index 1f640ac6db..923a568ab9 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf @@ -35,6 +35,16 @@ Die Abbilderfassung war aktiviert, aber es wurde keine Abbilddatei generiert. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf index 0c14c801b0..0d18b55ef6 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf @@ -35,6 +35,16 @@ La opción para recopilar un volcado de memoria estaba habilitada, pero no se generó ningún archivo de volcado de memoria. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf index 59467f7b37..c090ca0ff4 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf @@ -35,6 +35,16 @@ La collecte de fichiers dump a été activée, mais aucun fichier dump n'a été généré. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf index 035c47388f..9c5ad6d2e4 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf @@ -35,6 +35,16 @@ La raccolta del dump è stata abilitata ma non è stato generato alcun file di dump. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf index 5cf170ba4a..842d8cc538 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf @@ -35,6 +35,16 @@ ダンプの収集は有効化されましたが、ダンプ ファイルは生成されませんでした。 + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf index ffcd88fcb3..9d3f50fdbe 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf @@ -35,6 +35,16 @@ 덤프 수집이 사용하도록 설정되었지만 덤프 파일이 생성되지 않았습니다. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf index de02fc0f93..1c37c67cf0 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf @@ -35,6 +35,16 @@ Zbieranie zrzutów zostało włączone, ale nie wygenerowano żadnego pliku zrzutu. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf index f6ab620fc9..4eeab4426e 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf @@ -35,6 +35,16 @@ A coleta de despejo estava habilitada, mas não foi gerado nenhum arquivo de despejo. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf index 055fa926b6..999d856f8f 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf @@ -35,6 +35,16 @@ Сбор дампа включен, но файл дампа не создан. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf index cb2b5578d8..07a1b8a8d1 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf @@ -35,6 +35,16 @@ Döküm toplama etkindi, ancak hiçbir döküm dosyası oluşturulmamıştı. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf index d72978ec30..422def98a5 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf @@ -17,6 +17,16 @@ Collect dump was enabled but no dump file was generated. + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf index 07a2a93293..30c9fa3a1a 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf @@ -35,6 +35,16 @@ 收集转储已启用,但是未生成转储文件。 + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf index e6e2e68611..eb13074e53 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf @@ -35,6 +35,16 @@ 已啟用了收集傾印,但未產生任何傾印檔。 + + The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key {0} is not valid. Ignoring this parameter. + + + + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + \ No newline at end of file diff --git a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs index 7e7268fe16..4ac5180800 100644 --- a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs @@ -138,7 +138,13 @@ public void Initialize(string argument) bool isDumpEnabled = false; var parseSucceeded = LoggerUtilities.TryParseLoggerArgument(argument, out string loggerIdentifier, out Dictionary parameters); - if (parseSucceeded && loggerIdentifier.Equals(Constants.BlameCollectDumpKey, StringComparison.OrdinalIgnoreCase)) + + if (!string.IsNullOrWhiteSpace(argument) && !parseSucceeded) + { + throw new CommandLineException(string.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameInvalidFormat, argument)); + } + + if (loggerIdentifier != null && loggerIdentifier.Equals(Constants.BlameCollectDumpKey, StringComparison.OrdinalIgnoreCase)) { if (this.environment.OperatingSystem == PlatformOperatingSystem.Windows && this.environment.Architecture != PlatformArchitecture.ARM64 && @@ -153,7 +159,7 @@ public void Initialize(string argument) } else { - Output.Warning(false, CommandLineResources.BlameIncorrectParameters); + Output.Warning(false, string.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameIncorrectOption, loggerIdentifier)); } // Add Blame Logger @@ -224,41 +230,8 @@ private void AddCollectDumpNode(Dictionary parameters, XmlDocume { foreach (KeyValuePair entry in parameters) { - string attributeKey = null; - string attributeValue = null; - if (string.Equals(entry.Key, Constants.BlameCollectDumpOnProcessExitKey, StringComparison.OrdinalIgnoreCase)) - { - attributeKey = Constants.BlameCollectDumpOnProcessExitKey; - if(string.Equals(entry.Value, "true", StringComparison.OrdinalIgnoreCase) || string.Equals(entry.Value, "false", StringComparison.OrdinalIgnoreCase)) - { - attributeValue = entry.Value; - } - else - { - Output.Warning(false, String.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameParameterValueIncorrect, entry.Key, "true", "false")); - continue; - } - } - else if (string.Equals(entry.Key, Constants.BlameDumpTypeKey, StringComparison.OrdinalIgnoreCase)) - { - attributeKey = Constants.BlameDumpTypeKey; - if (string.Equals(entry.Value, "full", StringComparison.OrdinalIgnoreCase) || string.Equals(entry.Value, "mini", StringComparison.OrdinalIgnoreCase)) - { - attributeValue = entry.Value; - } - else - { - Output.Warning(false, String.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameParameterValueIncorrect, entry.Key, "mini", "full")); - continue; - } - } - else - { - Output.Warning(false, String.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameParameterKeyIncorrect, entry.Key)); - continue; - } - var attribute = XmlDocument.CreateAttribute(attributeKey); - attribute.Value = attributeValue; + var attribute = XmlDocument.CreateAttribute(entry.Key); + attribute.Value = entry.Value; dumpNode.Attributes.Append(attribute); } } diff --git a/src/vstest.console/Resources/Resources.Designer.cs b/src/vstest.console/Resources/Resources.Designer.cs index 8dc3f27eb9..960d5601ef 100644 --- a/src/vstest.console/Resources/Resources.Designer.cs +++ b/src/vstest.console/Resources/Resources.Designer.cs @@ -236,37 +236,27 @@ public static string BlameCollectDumpNotSupportedForPlatform } /// - /// The options specified with /blame is incorrect, it will be ignored. + /// The option specified with blame, {0} is invalid. This will be ignored.. /// - public static string BlameIncorrectParameters + public static string BlameIncorrectOption { get { - return ResourceManager.GetString("BlameIncorrectParameters", resourceCulture); + return ResourceManager.GetString("BlameIncorrectOption", resourceCulture); } } /// - /// The blame parameter {0} is not valid. Ignoring this parameter. + /// The blame option specified '{0}' is not a valid format. This will be ignored.. /// - public static string BlameParameterKeyIncorrect + public static string BlameInvalidFormat { get { - return ResourceManager.GetString("BlameParameterKeyIncorrect", resourceCulture); + return ResourceManager.GetString("BlameInvalidFormat", resourceCulture); } } - /// - /// The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - /// - public static string BlameParameterValueIncorrect - { - get - { - return ResourceManager.GetString("BlameParameterValueIncorrect", resourceCulture); - } - } /// /// Looks up a localized string similar to --BuildBasePath|/BuildBasePath:<BuildBasePath> /// The directory containing the temporary outputs.. diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index 71f23efc73..ae40690ca2 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -696,13 +696,10 @@ Example: /logger:console;prefix=<Defaults to "false"> More info on Console Logger here : https://aka.ms/console-logger - - The options specified with /blame is incorrect, it will be ignored. + + The option specified with blame, {0} is invalid. This will be ignored. - - The blame parameter {0} is not valid. Ignoring this parameter. - - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index effa5fb6e8..06451d219d 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Spustí test v režimu blame. Tato možnost je užitečná pro izolování problematického testu, který způsobuje chybové ukončení hostitele testů. V aktuálním adresáři se vytvoří výstupní soubor Sequence.xml, do kterého se zaznamená pořadí provádění testů před chybovým ukončením. - + Test Run Aborted. @@ -1579,19 +1589,14 @@ Možnost CollectDump pro Blame není pro tuto platformu podporovaná. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index 4019860f70..8de446a6c6 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Führt den Test im Modus "Verantwortung zuweisen" aus. Diese Option hilft bei der Isolierung des problematischen Tests, der den Absturz des Testhosts verursacht. Im aktuellen Verzeichnis wird eine Ausgabedatei "Sequence.xml" erstellt, in der die Reihenfolge der Testausführung vor dem Absturz erfasst wird. - + Test Run Aborted. @@ -1579,19 +1589,14 @@ Die CollectDump-Option für Blame wird für diese Plattform nicht unterstützt. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index 3a266524ba..8a6e3b1598 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1487,11 +1487,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Ejecuta la prueba en modo de culpa. Esta opción es útil para aislar la prueba problemática que provoca el bloqueo del host de prueba. Crea un archivo de salida en el directorio actual como "Sequence.xml" que captura el orden de ejecución de la prueba antes del bloqueo. - + Test Run Aborted. @@ -1584,19 +1594,14 @@ No se admite la opción CollectDump para Blame en esta plataforma. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index 49280ca1ee..114f2051f4 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Exécute le test en mode blame (responsabilité). Cette option permet d'isoler le test problématique qui est à l'origine d'un incident sur l'hôte de test. Elle crée dans le répertoire actif un fichier de sortie nommé "Sequence.xml", qui capture l'ordre d'exécution du test avant l'incident. - + Test Run Aborted. @@ -1579,19 +1589,14 @@ L'option CollectDump pour Blame n'est pas prise en charge pour cette plateforme. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index b1bced9137..61effdc54b 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Esegue il test in modalità di segnalazione errore. Questa opzione è utile per isolare il test problematico che causa l'arresto anomalo dell'host dei test. Crea nella directory corrente un file di output denominato "Sequence.xml", in cui viene acquisito l'ordine di esecuzione del test prima dell'arresto anomalo. - + Test Run Aborted. @@ -1579,19 +1589,14 @@ L'opzione CollectDump per Blame non è supportata per questa piattaforma. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index ae89e52847..ed30c04d2e 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame 変更履歴モードでテストを実行します。このオプションは、テスト ホストのクラッシュの原因となる問題のあるテストを分離する場合に役立ちます。現在のディレクトリに、クラッシュする前のテスト実行順序を示す出力ファイル "Sequence.xml" が作成されます。 - + Test Run Aborted. @@ -1579,19 +1589,14 @@ このプラットフォームでは、Blame の CollectDump オプションはサポートされていません。 - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index b9feb01ca4..a27de1e510 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame 테스트를 원인 모드로 실행합니다. 이 옵션은 테스트 호스트 작동을 중단시키는 문제 있는 테스트를 격리하는 데 유용합니다. 이 경우 현재 디렉터리에 "Sequence.xml"이라는 출력 파일을 만들며, 이 파일에는 작동 중단 이전 테스트 실행 순서가 캡처되어 있습니다. - + Test Run Aborted. @@ -1579,19 +1589,14 @@ Blame에 대한 CollectDump 옵션이 이 플랫폼에서 지원되지 않습니다. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index c424cca90e..2004b87868 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1481,11 +1481,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Uruchamia test w trybie Blame. Ta opcja jest przydatna przy izolowaniu problematycznego testu powodującego awarię hosta testów. Tworzy w bieżącym katalogu plik wyjściowy „Sequence.xml”, który przechwytuje kolejność wykonywania testu przed awarią. - + Test Run Aborted. @@ -1577,19 +1587,14 @@ Opcja CollectDump dla narzędzia Blame nie jest obsługiwana na tej platformie. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index f6d5a6ead1..76dd87fafe 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1481,11 +1481,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Executa o teste em modo de acusação. Essa opção é útil para isolar o teste problemático causando uma falha no host de teste. Ele cria um arquivo de saída no diretório atual como "Sequence.xml", que captura a ordem de execução do teste antes da falha. - + Test Run Aborted. @@ -1577,19 +1587,14 @@ A opção CollectDump para Blame não é compatível com esta plataforma. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index e226b46f8f..31722bb20b 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Запускает тест в режиме обвинения. Этот параметр нужен, чтобы изолировать проблемный тест, вызывающий сбой хоста для тестов. Он создает файл выходных данных в текущем каталоге (Sequence.xml), в котором записывается порядок выполнения теста перед сбоем. - + Test Run Aborted. @@ -1579,19 +1589,14 @@ Параметр CollectDump для Blame не поддерживается на этой платформе. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index c72166660e..ede3495056 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame Testi blame modunda çalıştırır. Bu seçenek, test konağı kilitlenmesine neden olan sorunlu testi belirlemek için kullanışlıdır. Geçerli dizinde testin kilitlenmeden önceki çalıştırılma sırasını yakalayan "Sequence.xml" adlı bir çıkış dosyası oluşturur. - + Test Run Aborted. @@ -1579,19 +1589,14 @@ Blame için CollectDump seçeneği bu platformda desteklenmez. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.xlf b/src/vstest.console/Resources/xlf/Resources.xlf index 555825f2b9..3a27eeee1d 100644 --- a/src/vstest.console/Resources/xlf/Resources.xlf +++ b/src/vstest.console/Resources/xlf/Resources.xlf @@ -669,8 +669,18 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full --Blame|/Blame Enable Blame mode to get name of the faulty test case in event of a test host crash. @@ -775,19 +785,14 @@ CollectDump option for Blame is not supported for this platform. - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. - - - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index 2f26edc9d3..f4506df45c 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame 在追责模式下运行测试。此选项有助于隔离有问题的测试,以免导致测试主机崩溃。它会在当前目录中创建一个输出文件 "Sequence.xml",用于在崩溃之前捕获测试的执行顺序。 - + Test Run Aborted. @@ -1579,19 +1589,14 @@ 此平台不支持用于追责的 CollectDump 选项。 - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index c5b65c0d3b..f5a544dfbe 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1482,11 +1482,21 @@ - --Blame|/Blame - Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. - --Blame|/Blame + --Blame|/Blame:[CollectDump];[Key]=[Value] + Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. + It creates an output file in the current directory as "Sequence.xml", + that captures the order of execution of test before the crash. + You may optionally choose to collect process dump for the test host. + By default, a mini dump will be collected on a crash. + You may also choose to override this by some optional parameters: + CollectDumpOnProcessExit - To collect dump on exit (true/false) + DumpType - To specify dump type (mini/full) + Example: /Blame + /Blame:CollectDump + /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + --Blame|/Blame 在 Blame 模式中執行測試。此選項有助於隔離造成測試主機損毀的問題測試。其會在目前的目錄中建立 "Sequence.xml" 這樣的輸出檔案,以擷取損毀前執行測試的順序。 - + Test Run Aborted. @@ -1579,19 +1589,14 @@ 對此平台不支援 Blame 的 CollectDump 選項。 - - The options specified with /blame is incorrect, it will be ignored. - The options specified with /blame is incorrect, it will be ignored. - - - - The blame parameter {0} is not valid. Ignoring this parameter. - The blame parameter {0} is not valid. Ignoring this parameter. + + The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not valid. This will be ignored. - - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. - The blame parameter {0} can only support values {1}/{2}. Ignoring this parameter. + + The option specified with blame, {0} is invalid. This will be ignored. + The option specified with blame, {0} is invalid. This will be ignored. diff --git a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs index 1ba80a44e3..49b106d85f 100644 --- a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs @@ -5,6 +5,7 @@ namespace Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests { using System; using System.Collections.Generic; + using System.Globalization; using System.IO; using System.Xml; @@ -283,10 +284,10 @@ public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityForFullDumpI public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityForFullDumpIfFullDumpEnabledCaseSensitivity() { var dumpConfig = this.GetDumpConfigurationElement(); - var dumpTypeAttribute = dumpConfig.OwnerDocument.CreateAttribute("DumpType"); + var dumpTypeAttribute = dumpConfig.OwnerDocument.CreateAttribute("DuMpType"); dumpTypeAttribute.Value = "FuLl"; dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpTypeAttribute); - var dumpOnExitAttribute = dumpConfig.OwnerDocument.CreateAttribute("CollectDumpOnProcessExit"); + var dumpOnExitAttribute = dumpConfig.OwnerDocument.CreateAttribute("CollEctDumpOnProcessExit"); dumpOnExitAttribute.Value = "FaLSe"; dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpOnExitAttribute); @@ -305,6 +306,84 @@ public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityForFullDumpI this.mockProcessDumpUtility.Verify(x => x.StartProcessDump(1234, It.IsAny(), It.IsAny(), true)); } + /// + /// The trigger test host launched handler should start process dump utility for full dump if full dump was enabled + /// + [TestMethod] + public void TriggerTestHostLaunchedHandlerShouldLogWarningForWrongCollectDumpKey() + { + var dumpConfig = this.GetDumpConfigurationElement(); + var dumpTypeAttribute = dumpConfig.OwnerDocument.CreateAttribute("Xyz"); + dumpTypeAttribute.Value = "FuLl"; + dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpTypeAttribute); + + // Initializing Blame Data Collector + this.blameDataCollector.Initialize( + dumpConfig, + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + this.mockLogger.Object, + this.context); + + // Raise TestHostLaunched + this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + + // Verify + this.mockLogger.Verify(x => x.LogWarning(It.IsAny(), It.Is(str => str == string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterKeyIncorrect, "Xyz"))), Times.Once); + } + + /// + /// The trigger test host launched handler should start process dump utility for full dump if full dump was enabled + /// + [TestMethod] + public void TriggerTestHostLaunchedHandlerShouldLogWarningForWrongDumpType() + { + var dumpConfig = this.GetDumpConfigurationElement(); + var dumpTypeAttribute = dumpConfig.OwnerDocument.CreateAttribute("DumpType"); + dumpTypeAttribute.Value = "random"; + dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpTypeAttribute); + + // Initializing Blame Data Collector + this.blameDataCollector.Initialize( + dumpConfig, + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + this.mockLogger.Object, + this.context); + + // Raise TestHostLaunched + this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + + // Verify + this.mockLogger.Verify(x => x.LogWarning(It.IsAny(), It.Is(str => str == string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterValueIncorrect, "DumpType", BlameDataCollector.Constants.FullConfigurationValue, BlameDataCollector.Constants.MiniConfigurationValue))), Times.Once); + } + + /// + /// The trigger test host launched handler should start process dump utility for full dump if full dump was enabled + /// + [TestMethod] + public void TriggerTestHostLaunchedHandlerShouldLogWarningForNonBooleanCollectAlwaysValue() + { + var dumpConfig = this.GetDumpConfigurationElement(); + var dumpTypeAttribute = dumpConfig.OwnerDocument.CreateAttribute("DumpType"); + dumpTypeAttribute.Value = "random"; + dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpTypeAttribute); + + // Initializing Blame Data Collector + this.blameDataCollector.Initialize( + dumpConfig, + this.mockDataColectionEvents.Object, + this.mockDataCollectionSink.Object, + this.mockLogger.Object, + this.context); + + // Raise TestHostLaunched + this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); + + // Verify + this.mockLogger.Verify(x => x.LogWarning(It.IsAny(), It.Is(str => str == string.Format(CultureInfo.CurrentUICulture, Resources.Resources.BlameParameterValueIncorrect, "DumpType", BlameDataCollector.Constants.FullConfigurationValue, BlameDataCollector.Constants.MiniConfigurationValue))), Times.Once); + } + /// /// The trigger test host launcehd handler should not break if start process dump throws TestPlatFormExceptions and log error message /// @@ -379,7 +458,7 @@ private XmlElement GetDumpConfigurationElement(bool isFullDump = false, bool col if (collectDumpOnExit) { - var fulldumpAttribute = xmldoc.CreateAttribute(BlameDataCollector.Constants.CollectDumpOnProcessExitKey); + var fulldumpAttribute = xmldoc.CreateAttribute(BlameDataCollector.Constants.CollectDumpAlwaysKey); fulldumpAttribute.Value = "true"; node.Attributes.Append(fulldumpAttribute); } diff --git a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs index 48f6e1abc7..273e9e4a26 100644 --- a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs @@ -5,6 +5,8 @@ namespace vstest.console.UnitTests.Processors { using System; using System.Collections.Generic; + using System.Globalization; + using Microsoft.VisualStudio.TestPlatform.CommandLine; using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; using Microsoft.VisualStudio.TestPlatform.Common; using Microsoft.VisualStudio.TestPlatform.Common.Interfaces; @@ -78,6 +80,20 @@ public void InitializeShouldCreateEntryForBlameInRunSettingsIfNotAlreadyPresent( Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); } + [TestMethod] + public void InitializeShouldOverwriteEntryForBlameInRunSettingsIfAlreadyPresent() + { + var runsettingsString = string.Format(DefaultRunSettings, ""); + var runsettings = new RunSettings(); + runsettings.LoadSettingsXml("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n"); + this.settingsProvider.SetActiveRunSettings(runsettings); + + this.executor.Initialize("CollectDump;DumpType=full;CollectDumpOnProcessExit=true"); + + Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + } + [TestMethod] public void InitializeShouldWarnIfPlatformNotSupportedForCollectDumpOption() { @@ -109,6 +125,7 @@ public void InitializeShouldWarnIfPlatformNotSupportedForCollectDumpOption() [TestMethod] public void InitializeShouldWarnIfIncorrectorParameterIsSpecifiedForCollectDumpOption() { + var invalidParameter = "CollectDumpXX"; var runsettingsString = string.Format(DefaultRunSettings, ""); var runsettings = new RunSettings(); runsettings.LoadSettingsXml(DefaultRunSettings); @@ -119,56 +136,18 @@ public void InitializeShouldWarnIfIncorrectorParameterIsSpecifiedForCollectDumpO this.mockEnvronment.Setup(x => x.Architecture) .Returns(PlatformArchitecture.X64); - this.executor.Initialize("CollectDumpXX"); - this.mockOutput.Verify(x => x.WriteLine(CommandLineResources.BlameIncorrectParameters, OutputLevel.Warning)); + this.executor.Initialize(invalidParameter); + this.mockOutput.Verify(x => x.WriteLine(string.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameIncorrectOption, invalidParameter), OutputLevel.Warning)); Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); } [TestMethod] - public void InitializeShouldWarnIfInvalidKeysAreSpecifiedForCollectDumpOption() - { - var runsettingsString = string.Format(DefaultRunSettings, ""); - var runsettings = new RunSettings(); - runsettings.LoadSettingsXml(DefaultRunSettings); - this.settingsProvider.SetActiveRunSettings(runsettings); - - this.mockEnvronment.Setup(x => x.OperatingSystem) - .Returns(PlatformOperatingSystem.Windows); - this.mockEnvronment.Setup(x => x.Architecture) - .Returns(PlatformArchitecture.X64); - - this.executor.Initialize("CollectDump;Key=value"); - this.mockOutput.Verify(x => x.WriteLine(string.Format(CommandLineResources.BlameParameterKeyIncorrect, "Key"), OutputLevel.Warning)); - - Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); - Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); - } - - [TestMethod] - public void InitializeShouldWarnIfInvalidValuesAreSpecifiedForCollectDumpOption() - { - var runsettingsString = string.Format(DefaultRunSettings, ""); - var runsettings = new RunSettings(); - runsettings.LoadSettingsXml(DefaultRunSettings); - this.settingsProvider.SetActiveRunSettings(runsettings); - - this.mockEnvronment.Setup(x => x.OperatingSystem) - .Returns(PlatformOperatingSystem.Windows); - this.mockEnvronment.Setup(x => x.Architecture) - .Returns(PlatformArchitecture.X64); - - this.executor.Initialize("CollectDump;CollectDumpOnProcessExit=asd"); - this.mockOutput.Verify(x => x.WriteLine(string.Format(CommandLineResources.BlameParameterValueIncorrect, "CollectDumpOnProcessExit", "true", "false") , OutputLevel.Warning)); - - Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); - Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); - } - - [TestMethod] + [ExpectedException(typeof(CommandLineException))] public void InitializeShouldWarnIfInvalidParameterFormatIsSpecifiedForCollectDumpOption() { + var invalidString = "CollectDump;sdf=sdg;;as;a="; var runsettingsString = string.Format(DefaultRunSettings, ""); var runsettings = new RunSettings(); runsettings.LoadSettingsXml(DefaultRunSettings); @@ -179,8 +158,8 @@ public void InitializeShouldWarnIfInvalidParameterFormatIsSpecifiedForCollectDum this.mockEnvronment.Setup(x => x.Architecture) .Returns(PlatformArchitecture.X64); - this.executor.Initialize("CollectDump;sdf=sdg;;as;a="); - this.mockOutput.Verify(x => x.WriteLine(CommandLineResources.BlameIncorrectParameters, OutputLevel.Warning)); + this.executor.Initialize(invalidString); + this.mockOutput.Verify(x => x.WriteLine(string.Format(CultureInfo.CurrentUICulture, CommandLineResources.BlameInvalidFormat, invalidString), OutputLevel.Warning)); Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); @@ -224,25 +203,6 @@ public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpParametersIfE Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); } - [TestMethod] - public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpParametersCaseInsensitively() - { - var runsettingsString = string.Format(DefaultRunSettings, ""); - var runsettings = new RunSettings(); - runsettings.LoadSettingsXml(DefaultRunSettings); - this.settingsProvider.SetActiveRunSettings(runsettings); - - this.mockEnvronment.Setup(x => x.OperatingSystem) - .Returns(PlatformOperatingSystem.Windows); - this.mockEnvronment.Setup(x => x.Architecture) - .Returns(PlatformArchitecture.X64); - - this.executor.Initialize("CollectDump;DUmpTYpe=full;CollectDUMPOnProcessExit=true"); - - Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); - Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); - } - internal class TestableEnableBlameArgumentExecutor : EnableBlameArgumentExecutor { internal TestableEnableBlameArgumentExecutor(IRunSettingsProvider runSettingsManager, IEnvironment environment, IOutput output) From 407442ff7dfee45603a5a93739a5fe26931a8263 Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Fri, 27 Jul 2018 14:13:38 +0530 Subject: [PATCH 08/10] Renaming parameter --- .../Constants.cs | 2 +- .../Resources/Resources.Designer.cs | 4 ++-- .../Resources/Resources.resx | 4 ++-- .../Resources/xlf/Resources.cs.xlf | 4 ++-- .../Resources/xlf/Resources.de.xlf | 4 ++-- .../Resources/xlf/Resources.es.xlf | 4 ++-- .../Resources/xlf/Resources.fr.xlf | 4 ++-- .../Resources/xlf/Resources.it.xlf | 4 ++-- .../Resources/xlf/Resources.ja.xlf | 4 ++-- .../Resources/xlf/Resources.ko.xlf | 4 ++-- .../Resources/xlf/Resources.pl.xlf | 4 ++-- .../Resources/xlf/Resources.pt-BR.xlf | 4 ++-- .../Resources/xlf/Resources.ru.xlf | 4 ++-- .../Resources/xlf/Resources.tr.xlf | 4 ++-- .../Resources/xlf/Resources.xlf | 4 ++-- .../Resources/xlf/Resources.zh-Hans.xlf | 4 ++-- .../Resources/xlf/Resources.zh-Hant.xlf | 4 ++-- .../Constants.cs | 10 ---------- .../Resources/Resources.Designer.cs | 4 ++-- src/vstest.console/Resources/Resources.resx | 16 ++++++++-------- .../Resources/xlf/Resources.cs.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.de.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.es.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.fr.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.it.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.ja.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.ko.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.pl.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.pt-BR.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.ru.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.tr.xlf | 16 ++++++++-------- src/vstest.console/Resources/xlf/Resources.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.zh-Hans.xlf | 16 ++++++++-------- .../Resources/xlf/Resources.zh-Hant.xlf | 16 ++++++++-------- .../BlameCollectorTests.cs | 2 +- .../EnableBlameArgumentProcessorTests.cs | 10 +++++----- 36 files changed, 161 insertions(+), 171 deletions(-) diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs index 57f9d9a3f4..a69e025599 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Constants.cs @@ -46,7 +46,7 @@ internal static class Constants /// /// Configuration key name for collect dump always /// - public const string CollectDumpAlwaysKey = "CollectDumpOnProcessExit"; + public const string CollectDumpAlwaysKey = "CollectAlways"; /// /// Configuration key name for dump type diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs index f02dcd2dcb..2c873f2bc8 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs @@ -70,7 +70,7 @@ internal static string AbortedTestRun { } /// - /// The blame parameter key {0} is not valid. Ignoring this parameter. + /// The blame parameter key specified {0} is not valid. Ignoring this key.. /// internal static string BlameParameterKeyIncorrect { @@ -81,7 +81,7 @@ internal static string BlameParameterKeyIncorrect } /// - /// The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + /// The blame parameter key {0} can only support values {1}/{2}. Ignoring this key.. /// internal static string BlameParameterValueIncorrect { diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx index c9e91b7659..e992e4d72e 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx @@ -121,10 +121,10 @@ The active Test Run was aborted because the host process exited unexpectedly while executing following test(s): - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. Collect dump was enabled but no dump file was generated. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf index 6e67bfb5bf..5b97fe3176 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf index 923a568ab9..35cb80da54 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf index 0d18b55ef6..734e75f260 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf index c090ca0ff4..e839566bbd 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf index 9c5ad6d2e4..cd7668e7df 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf index 842d8cc538..70a741ac51 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf index 9d3f50fdbe..86cce99562 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf index 1c37c67cf0..2d6984f0b7 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf index 4eeab4426e..bd0eac4a25 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf index 999d856f8f..75dcd26993 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf index 07a1b8a8d1..137f5a9ab0 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf index 422def98a5..f5d274ebbf 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf @@ -18,12 +18,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf index 30c9fa3a1a..bc0fecbedd 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf index eb13074e53..c0b8f981a7 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf @@ -36,12 +36,12 @@ - The blame parameter key {0} is not valid. Ignoring this parameter. + The blame parameter key specified {0} is not valid. Ignoring this key. The blame parameter key {0} is not valid. Ignoring this parameter. - The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + The blame parameter key {0} can only support values {1}/{2}. Ignoring this key. The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Constants.cs b/src/Microsoft.TestPlatform.ObjectModel/Constants.cs index 1a1da15bdd..edb2d4d7c3 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Constants.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Constants.cs @@ -35,16 +35,6 @@ public static class Constants /// public const string BlameCollectDumpKey = "CollectDump"; - /// - /// Name of collect dump option for blame. - /// - public const string BlameDumpTypeKey = "DumpType"; - - /// - /// Name of collect dump option for blame. - /// - public const string BlameCollectDumpOnProcessExitKey = "CollectDumpOnProcessExit"; - /// /// Name of data collection settings node in RunSettings. /// diff --git a/src/vstest.console/Resources/Resources.Designer.cs b/src/vstest.console/Resources/Resources.Designer.cs index 960d5601ef..72469be8e8 100644 --- a/src/vstest.console/Resources/Resources.Designer.cs +++ b/src/vstest.console/Resources/Resources.Designer.cs @@ -236,7 +236,7 @@ public static string BlameCollectDumpNotSupportedForPlatform } /// - /// The option specified with blame, {0} is invalid. This will be ignored.. + /// The blame parameter specified with blame, {0} is invalid. Ignoring this parameter.. /// public static string BlameIncorrectOption { @@ -247,7 +247,7 @@ public static string BlameIncorrectOption } /// - /// The blame option specified '{0}' is not a valid format. This will be ignored.. + /// The blame option specified '{0}' is not a valid format. Please correct it and retry.. /// public static string BlameInvalidFormat { diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index ae40690ca2..4d1bd137df 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -647,18 +647,18 @@ Read response file for more options. - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full Test Run Aborted. @@ -697,9 +697,9 @@ More info on Console Logger here : https://aka.ms/console-logger - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index 06451d219d..32bdf20b24 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Spustí test v režimu blame. Tato možnost je užitečná pro izolování problematického testu, který způsobuje chybové ukončení hostitele testů. V aktuálním adresáři se vytvoří výstupní soubor Sequence.xml, do kterého se zaznamená pořadí provádění testů před chybovým ukončením. @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index 8de446a6c6..a5422091cc 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Führt den Test im Modus "Verantwortung zuweisen" aus. Diese Option hilft bei der Isolierung des problematischen Tests, der den Absturz des Testhosts verursacht. Im aktuellen Verzeichnis wird eine Ausgabedatei "Sequence.xml" erstellt, in der die Reihenfolge der Testausführung vor dem Absturz erfasst wird. @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index 8a6e3b1598..1c54f9f1df 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1487,18 +1487,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Ejecuta la prueba en modo de culpa. Esta opción es útil para aislar la prueba problemática que provoca el bloqueo del host de prueba. Crea un archivo de salida en el directorio actual como "Sequence.xml" que captura el orden de ejecución de la prueba antes del bloqueo. @@ -1595,12 +1595,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index 114f2051f4..3fd78458eb 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Exécute le test en mode blame (responsabilité). Cette option permet d'isoler le test problématique qui est à l'origine d'un incident sur l'hôte de test. Elle crée dans le répertoire actif un fichier de sortie nommé "Sequence.xml", qui capture l'ordre d'exécution du test avant l'incident. @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index 61effdc54b..e9a327c784 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Esegue il test in modalità di segnalazione errore. Questa opzione è utile per isolare il test problematico che causa l'arresto anomalo dell'host dei test. Crea nella directory corrente un file di output denominato "Sequence.xml", in cui viene acquisito l'ordine di esecuzione del test prima dell'arresto anomalo. @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index ed30c04d2e..02df7b95f9 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame 変更履歴モードでテストを実行します。このオプションは、テスト ホストのクラッシュの原因となる問題のあるテストを分離する場合に役立ちます。現在のディレクトリに、クラッシュする前のテスト実行順序を示す出力ファイル "Sequence.xml" が作成されます。 @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index a27de1e510..f857f80db3 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame 테스트를 원인 모드로 실행합니다. 이 옵션은 테스트 호스트 작동을 중단시키는 문제 있는 테스트를 격리하는 데 유용합니다. 이 경우 현재 디렉터리에 "Sequence.xml"이라는 출력 파일을 만들며, 이 파일에는 작동 중단 이전 테스트 실행 순서가 캡처되어 있습니다. @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index 2004b87868..293e5991fd 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1481,18 +1481,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Uruchamia test w trybie Blame. Ta opcja jest przydatna przy izolowaniu problematycznego testu powodującego awarię hosta testów. Tworzy w bieżącym katalogu plik wyjściowy „Sequence.xml”, który przechwytuje kolejność wykonywania testu przed awarią. @@ -1588,12 +1588,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index 76dd87fafe..fcbead77bb 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1481,18 +1481,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Executa o teste em modo de acusação. Essa opção é útil para isolar o teste problemático causando uma falha no host de teste. Ele cria um arquivo de saída no diretório atual como "Sequence.xml", que captura a ordem de execução do teste antes da falha. @@ -1588,12 +1588,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index 31722bb20b..fa1cbe992c 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Запускает тест в режиме обвинения. Этот параметр нужен, чтобы изолировать проблемный тест, вызывающий сбой хоста для тестов. Он создает файл выходных данных в текущем каталоге (Sequence.xml), в котором записывается порядок выполнения теста перед сбоем. @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index ede3495056..2c2bfa0cbb 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Testi blame modunda çalıştırır. Bu seçenek, test konağı kilitlenmesine neden olan sorunlu testi belirlemek için kullanışlıdır. Geçerli dizinde testin kilitlenmeden önceki çalıştırılma sırasını yakalayan "Sequence.xml" adlı bir çıkış dosyası oluşturur. @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.xlf b/src/vstest.console/Resources/xlf/Resources.xlf index 3a27eeee1d..f831e0553e 100644 --- a/src/vstest.console/Resources/xlf/Resources.xlf +++ b/src/vstest.console/Resources/xlf/Resources.xlf @@ -669,18 +669,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame Enable Blame mode to get name of the faulty test case in event of a test host crash. @@ -786,12 +786,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index f4506df45c..923efbcf74 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame 在追责模式下运行测试。此选项有助于隔离有问题的测试,以免导致测试主机崩溃。它会在当前目录中创建一个输出文件 "Sequence.xml",用于在崩溃之前捕获测试的执行顺序。 @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index f5a544dfbe..8f5cc110b0 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1482,18 +1482,18 @@ - --Blame|/Blame:[CollectDump];[Key]=[Value] + --Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value] Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash. It creates an output file in the current directory as "Sequence.xml", that captures the order of execution of test before the crash. You may optionally choose to collect process dump for the test host. - By default, a mini dump will be collected on a crash. - You may also choose to override this by some optional parameters: - CollectDumpOnProcessExit - To collect dump on exit (true/false) - DumpType - To specify dump type (mini/full) + When you choose to collect dump, by default, a mini dump will be collected on a crash. + You may also choose to override this default behaviour by some optional parameters: + CollectAlways - To collect dump on exit even if there is no crash (true/false) + DumpType - To specify dump type (mini/full). Example: /Blame /Blame:CollectDump - /Blame:CollectDump;CollectDumpOnProcessExit=true;DumpType=full + /Blame:CollectDump;CollectAlways=true;DumpType=full --Blame|/Blame 在 Blame 模式中執行測試。此選項有助於隔離造成測試主機損毀的問題測試。其會在目前的目錄中建立 "Sequence.xml" 這樣的輸出檔案,以擷取損毀前執行測試的順序。 @@ -1590,12 +1590,12 @@ - The blame option specified '{0}' is not a valid format. This will be ignored. + The blame option specified '{0}' is not a valid format. Please correct it and retry. The blame option specified '{0}' is not valid. This will be ignored. - The option specified with blame, {0} is invalid. This will be ignored. + The blame parameter specified with blame, {0} is invalid. Ignoring this parameter. The option specified with blame, {0} is invalid. This will be ignored. diff --git a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs index 49b106d85f..2a0d2d961b 100644 --- a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs @@ -287,7 +287,7 @@ public void TriggerTestHostLaunchedHandlerShouldStartProcDumpUtilityForFullDumpI var dumpTypeAttribute = dumpConfig.OwnerDocument.CreateAttribute("DuMpType"); dumpTypeAttribute.Value = "FuLl"; dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpTypeAttribute); - var dumpOnExitAttribute = dumpConfig.OwnerDocument.CreateAttribute("CollEctDumpOnProcessExit"); + var dumpOnExitAttribute = dumpConfig.OwnerDocument.CreateAttribute("CollEctAlways"); dumpOnExitAttribute.Value = "FaLSe"; dumpConfig[BlameDataCollector.Constants.DumpModeKey].Attributes.Append(dumpOnExitAttribute); diff --git a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs index 273e9e4a26..c1611ef17f 100644 --- a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs @@ -85,13 +85,13 @@ public void InitializeShouldOverwriteEntryForBlameInRunSettingsIfAlreadyPresent( { var runsettingsString = string.Format(DefaultRunSettings, ""); var runsettings = new RunSettings(); - runsettings.LoadSettingsXml("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n"); + runsettings.LoadSettingsXml("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n"); this.settingsProvider.SetActiveRunSettings(runsettings); - this.executor.Initialize("CollectDump;DumpType=full;CollectDumpOnProcessExit=true"); + this.executor.Initialize("CollectDump;DumpType=full;CollectAlways=true"); Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); - Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); } [TestMethod] @@ -197,10 +197,10 @@ public void InitializeShouldCreateEntryForBlameAlongWithCollectDumpParametersIfE this.mockEnvronment.Setup(x => x.Architecture) .Returns(PlatformArchitecture.X64); - this.executor.Initialize("CollectDump;DumpType=full;CollectDumpOnProcessExit=true"); + this.executor.Initialize("CollectDump;DumpType=full;CollectAlways=true"); Assert.IsNotNull(this.settingsProvider.ActiveRunSettings); - Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); + Assert.AreEqual("\r\n\r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n C:\\dir\\TestResults\r\n \r\n \r\n \r\n \r\n \r\n \r\n", this.settingsProvider.ActiveRunSettings.SettingsXml); } internal class TestableEnableBlameArgumentExecutor : EnableBlameArgumentExecutor From 56c701fa912efab1b2fcca74b1f554dfcd8daadf Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Fri, 27 Jul 2018 15:14:40 +0530 Subject: [PATCH 09/10] Minor fixes --- .../BlameCollector.cs | 6 ++--- .../Resources/Resources.Designer.cs | 22 +++++++++++++++++++ .../Resources/Resources.resx | 6 +++++ .../Resources/xlf/Resources.cs.xlf | 10 +++++++++ .../Resources/xlf/Resources.de.xlf | 10 +++++++++ .../Resources/xlf/Resources.es.xlf | 10 +++++++++ .../Resources/xlf/Resources.fr.xlf | 10 +++++++++ .../Resources/xlf/Resources.it.xlf | 10 +++++++++ .../Resources/xlf/Resources.ja.xlf | 10 +++++++++ .../Resources/xlf/Resources.ko.xlf | 10 +++++++++ .../Resources/xlf/Resources.pl.xlf | 10 +++++++++ .../Resources/xlf/Resources.pt-BR.xlf | 10 +++++++++ .../Resources/xlf/Resources.ru.xlf | 10 +++++++++ .../Resources/xlf/Resources.tr.xlf | 10 +++++++++ .../Resources/xlf/Resources.xlf | 10 +++++++++ .../Resources/xlf/Resources.zh-Hans.xlf | 10 +++++++++ .../Resources/xlf/Resources.zh-Hant.xlf | 10 +++++++++ .../EnableBlameArgumentProcessorTests.cs | 2 +- 18 files changed, 172 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs index 31577df958..316d07317d 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs @@ -213,7 +213,7 @@ private void SessionEnded_Handler(object sender, SessionEndEventArgs args) else { EqtTrace.Warning("BlameCollector.SessionEnded_Handler: blame:CollectDump was enabled but dump file was not generated."); - this.logger.LogWarning(args.Context, "BlameCollector.SessionEnded_Handler: blame:CollectDump was enabled but dump file was not generated."); + this.logger.LogWarning(args.Context, Resources.Resources.ProcDumpNotGenerated); } } catch (FileNotFoundException ex) @@ -250,7 +250,7 @@ private void TestHostLaunched_Handler(object sender, TestHostLaunchedEventArgs a EqtTrace.Warning("BlameCollector.TestHostLaunched_Handler: Could not start process dump. {0}", e); } - this.logger.LogWarning(args.Context, e.Message); + this.logger.LogWarning(args.Context, string.Format(CultureInfo.CurrentUICulture, Resources.Resources.ProcDumpCouldNotStart, e.Message)); } catch (Exception e) { @@ -259,7 +259,7 @@ private void TestHostLaunched_Handler(object sender, TestHostLaunchedEventArgs a EqtTrace.Warning("BlameCollector.TestHostLaunched_Handler: Could not start process dump. {0}", e); } - this.logger.LogWarning(args.Context, e.ToString()); + this.logger.LogWarning(args.Context, string.Format(CultureInfo.CurrentUICulture, Resources.Resources.ProcDumpCouldNotStart, e.ToString())); } } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs index 2c873f2bc8..959f718ca8 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.Designer.cs @@ -91,6 +91,17 @@ internal static string BlameParameterValueIncorrect } } + /// + /// Could not start process dump: {0}. + /// + internal static string ProcDumpCouldNotStart + { + get + { + return ResourceManager.GetString("ProcDumpCouldNotStart", resourceCulture); + } + } + /// /// Looks up a localized string similar to Required environment variable PROCDUMP_PATH was null or empty. Set PROCDUMP_PATH to path of folder containing appropriate procdump executable. /// @@ -102,6 +113,17 @@ internal static string ProcDumpEnvVarEmpty } } + /// + /// CollectDump was enabled but dump file was not generated.. + /// + internal static string ProcDumpNotGenerated + { + get + { + return ResourceManager.GetString("ProcDumpNotGenerated", resourceCulture); + } + } + /// /// Looks up a localized string similar to Collect dump was enabled but no dump file was generated. /// diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx index e992e4d72e..1106193219 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/Resources.resx @@ -129,7 +129,13 @@ Collect dump was enabled but no dump file was generated. + + Could not start process dump: {0} + Required environment variable PROCDUMP_PATH was null or empty. Set PROCDUMP_PATH to path of folder containing appropriate procdump executable. + + CollectDump was enabled but dump file was not generated. + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf index 5b97fe3176..940447921f 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf index 35cb80da54..26872ed16c 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf index 734e75f260..43e794307a 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf index e839566bbd..dd1cfe8bba 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf index cd7668e7df..cbac6c395d 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf index 70a741ac51..840b5fe352 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf index 86cce99562..56ad96a37f 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf index 2d6984f0b7..49fdb137c9 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf index bd0eac4a25..e6c87dd25c 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pt-BR.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf index 75dcd26993..7f1e29681b 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf index 137f5a9ab0..3ec68b1602 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf index f5d274ebbf..43ecfc18ff 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.xlf @@ -27,6 +27,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf index bc0fecbedd..a2afff0535 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hans.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf index c0b8f981a7..a7cb6749a4 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.zh-Hant.xlf @@ -45,6 +45,16 @@ The blame parameter key {0} can only support values {1}/{2}. Ignoring this parameter. + + Could not start process dump: {0} + Could not start process dump: {0} + + + + CollectDump was enabled but dump file was not generated. + CollectDump was enabled but dump file was not generated. + + \ No newline at end of file diff --git a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs index c1611ef17f..66c12096cf 100644 --- a/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/EnableBlameArgumentProcessorTests.cs @@ -145,7 +145,7 @@ public void InitializeShouldWarnIfIncorrectorParameterIsSpecifiedForCollectDumpO [TestMethod] [ExpectedException(typeof(CommandLineException))] - public void InitializeShouldWarnIfInvalidParameterFormatIsSpecifiedForCollectDumpOption() + public void InitializeShouldThrowIfInvalidParameterFormatIsSpecifiedForCollectDumpOption() { var invalidString = "CollectDump;sdf=sdg;;as;a="; var runsettingsString = string.Format(DefaultRunSettings, ""); From 186df0ae96aec9d01186761a83496634768f2bb8 Mon Sep 17 00:00:00 2001 From: Kavipriya Adhinarayanan Date: Fri, 27 Jul 2018 15:31:29 +0530 Subject: [PATCH 10/10] Fixing tests --- .../BlameCollectorTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs index 2a0d2d961b..4d78f51064 100644 --- a/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests/BlameCollectorTests.cs @@ -407,7 +407,7 @@ public void TriggerTestHostLaunchedHandlerShouldCatchTestPlatFormExceptionsAndRe this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); // Verify - this.mockLogger.Verify(x => x.LogWarning(It.IsAny(), It.Is(str => str == tpex.Message)), Times.Once); + this.mockLogger.Verify(x => x.LogWarning(It.IsAny(), It.Is(str => str == string.Format(CultureInfo.CurrentUICulture, Resources.Resources.ProcDumpCouldNotStart, tpex.Message))), Times.Once); } /// @@ -433,7 +433,7 @@ public void TriggerTestHostLaunchedHandlerShouldCatchAllUnexpectedExceptionsAndR this.mockDataColectionEvents.Raise(x => x.TestHostLaunched += null, new TestHostLaunchedEventArgs(this.dataCollectionContext, 1234)); // Verify - this.mockLogger.Verify(x => x.LogWarning(It.IsAny(), It.Is(str => str == ex.ToString())), Times.Once); + this.mockLogger.Verify(x => x.LogWarning(It.IsAny(), It.Is(str => str == string.Format(CultureInfo.CurrentUICulture, Resources.Resources.ProcDumpCouldNotStart, ex.ToString()))), Times.Once); } [TestCleanup]