diff --git a/src/DataCollectors/TraceDataCollector/Microsoft.VisualStudio.TraceDataCollector.csproj b/src/DataCollectors/TraceDataCollector/Microsoft.VisualStudio.TraceDataCollector.csproj index a1f23c7cae..b88a138708 100644 --- a/src/DataCollectors/TraceDataCollector/Microsoft.VisualStudio.TraceDataCollector.csproj +++ b/src/DataCollectors/TraceDataCollector/Microsoft.VisualStudio.TraceDataCollector.csproj @@ -15,6 +15,7 @@ + diff --git a/src/DataCollectors/TraceDataCollector/VanguardCollector/DynamicCoverageDataCollectorImpl.cs b/src/DataCollectors/TraceDataCollector/VanguardCollector/DynamicCoverageDataCollectorImpl.cs index bac2a03655..40a8a9a38f 100644 --- a/src/DataCollectors/TraceDataCollector/VanguardCollector/DynamicCoverageDataCollectorImpl.cs +++ b/src/DataCollectors/TraceDataCollector/VanguardCollector/DynamicCoverageDataCollectorImpl.cs @@ -11,6 +11,7 @@ namespace Microsoft.VisualStudio.Coverage using System.Xml; using Interfaces; using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; + using Microsoft.VisualStudio.TestPlatform.Utilities; using TestPlatform.ObjectModel; using TraceCollector; using TraceCollector.Interfaces; @@ -107,10 +108,29 @@ public virtual void Initialize( IDataCollectionSink dataSink, IDataCollectionLogger logger) { + var defaultConfigurationElement = DynamicCoverageDataCollectorImpl.GetDefaultConfiguration(); + + try + { + var processor = new CodeCoverageRunSettingsProcessor(defaultConfigurationElement); + configurationElement = (XmlElement)processor.Process(configurationElement); + } + catch (Exception ex) + { + EqtTrace.Warning( + string.Format( + CultureInfo.CurrentCulture, + string.Join( + " ", + "DynamicCoverageDataCollectorImpl.Initialize: Exception encountered while processing the configuration element.", + "Keeping the configuration element unaltered. More info about the exception: {0}"), + ex.Message)); + } + EqtTrace.Info("DynamicCoverageDataCollectorImpl.Initialize: Initialize configuration. "); if (string.IsNullOrEmpty(configurationElement?.InnerXml)) { - configurationElement = DynamicCoverageDataCollectorImpl.GetDefaultConfiguration(); + configurationElement = defaultConfigurationElement; } this.logger = logger; diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs index be447f7fc0..f1606df6b6 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs @@ -17,6 +17,7 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.DataCollector using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; + using Microsoft.VisualStudio.TestPlatform.Utilities; using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces; /// @@ -117,11 +118,21 @@ public void Initialize(SessionId id, string outputDirectory, IMessageSink messag this.SessionOutputDirectory = Path.Combine(absolutePath, id.Id.ToString()); } - // Create the output directory if it doesn't exist. - if (!Directory.Exists(this.SessionOutputDirectory)) + try + { + // Create the output directory if it doesn't exist. + if (!Directory.Exists(this.SessionOutputDirectory)) + { + Directory.CreateDirectory(this.SessionOutputDirectory); + } + } + catch (UnauthorizedAccessException accessException) { - Directory.CreateDirectory(this.SessionOutputDirectory); + string accessDeniedMessage = string.Format(CultureInfo.CurrentCulture, Resources.Resources.AccessDenied, accessException.Message); + ConsoleOutput.Instance.Error(false, accessDeniedMessage); + throw; } + } /// diff --git a/src/Microsoft.TestPlatform.Common/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.Common/Resources/Resources.Designer.cs index 4907235e78..4e54d9b88e 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.Common/Resources/Resources.Designer.cs @@ -60,6 +60,15 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message:. + /// + internal static string AccessDenied { + get { + return ResourceManager.GetString("AccessDenied", resourceCulture); + } + } + /// /// Looks up a localized string similar to Cancelling the operation as requested.. /// diff --git a/src/Microsoft.TestPlatform.Common/Resources/Resources.resx b/src/Microsoft.TestPlatform.Common/Resources/Resources.resx index 42d99d6496..3bd129b67e 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/Resources.resx +++ b/src/Microsoft.TestPlatform.Common/Resources/Resources.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Cancelling the operation as requested. diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.cs.xlf index fed20b4eb1..d133688a44 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.cs.xlf @@ -279,6 +279,11 @@ Nepovedlo se načíst rozšíření ze souboru {0}. Další informace získáte pomocí parametru /diag. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.de.xlf index c4db77f1e0..a32b737dcb 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.de.xlf @@ -279,6 +279,11 @@ Fehler beim Laden von Erweiterungen aus der Datei "{0}". Verwenden Sie "/diag", um weitere Informationen zu erhalten. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.es.xlf index df612b6a04..3cd6c28c61 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.es.xlf @@ -279,6 +279,11 @@ No se pudieron cargar las extensiones del archivo "{0}". Use /diag para obtener más información. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.fr.xlf index 2f293f80fc..a93ba7f7a7 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.fr.xlf @@ -279,6 +279,11 @@ Le chargement des extensions à partir du fichier '{0}' a échoué. Pour plus d'informations, utilisez /diag. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.it.xlf index 4cb186f1da..2fa712363e 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.it.xlf @@ -279,6 +279,11 @@ Non è stato possibile caricare le estensioni dal file '{0}'. Per altre informazioni, usare /diag. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ja.xlf index 3b900a7fe5..2dbbfd1da0 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ja.xlf @@ -279,6 +279,11 @@ ファイル '{0}' から拡張機能を読み込めませんでした。詳細な情報を得るには、/diag をご使用ください。 + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ko.xlf index 6d84c20c02..b4a5aacc1e 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ko.xlf @@ -279,6 +279,11 @@ '{0}' 파일에서 확장을 로드하지 못했습니다. 자세한 내용을 보려면 /diag를 사용하세요. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pl.xlf index 7870442226..96b31a5915 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pl.xlf @@ -279,6 +279,11 @@ Nie można załadować rozszerzeń z pliku „{0}”. Aby uzyskać więcej informacji, użyj opcji /diag. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pt-BR.xlf index 750adbb9fa..ecea0433f8 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.pt-BR.xlf @@ -279,6 +279,11 @@ Falha ao carregar as extensões do arquivo '{0}'. Use /diag para obter mais informações. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ru.xlf index 16b5ce0949..0af790c4d3 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ru.xlf @@ -279,6 +279,11 @@ Не удалось загрузить расширения из файла "{0}". Для получения дополнительных сведений используйте /diag. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.tr.xlf index 462c026725..8cb4e5a36d 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.tr.xlf @@ -279,6 +279,11 @@ Uzantılar '{0}' dosyasından yüklenemedi. Daha fazla bilgi için lütfen /diag kullanın. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.xlf index d1ce2a6073..257a771cbf 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.xlf @@ -156,6 +156,11 @@ TestPluginDiscoverer: Failed to load extensions from file '{0}'. Please use /diag for more information. + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hans.xlf index 6c0e2790c0..95a2c984e0 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hans.xlf @@ -279,6 +279,11 @@ 未能从文件 "{0}" 加载扩展。有关详细信息,请使用 /diag。 + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hant.xlf index 713186ebb1..237e3d450d 100644 --- a/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.zh-Hant.xlf @@ -279,6 +279,11 @@ 無法從檔案 '{0}' 載入延伸模組。如需詳細資訊,請使用 /diag。 + + {0} Access denied while trying to create "TestResults" folder in mentioned location. You are getting this exception because you are running vstest.console.exe from a folder which requires having write access. To solve the issue: please run vstest.console.exe from a folder where you have write privileges. For more information, please look at the error message: + Access denied while trying to create "TestResults" folder in current location. You are getting this exception because you are running vstest.console.exe from a folder which requires administrator rights. To solve the issue : please open command line "As Administrator" or run vstest.console.exe from a folder where you have admin privileges. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.cs.xlf index ac54905e0f..59eb6c1d7d 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.cs.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Ladicí program se nedá připojit k výchozímu hostiteli testů. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.de.xlf index 078b8e43f7..fe5bcdd82b 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.de.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Der Debugger kann nicht an den Standardtesthost angefügt werden. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.es.xlf index 2ea0f141bc..db72fc85d8 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.es.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + No se puede asociar el depurador al host de prueba predeterminado. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.fr.xlf index f2eec1579b..8a5bf7b130 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.fr.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Impossible d'attacher le débogueur à l'hôte de test par défaut. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.it.xlf index fb0e96fa76..2ded89872b 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.it.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Non è possibile collegare il debugger all'host di test predefinito. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ja.xlf index c081c3a02d..d46fea29f2 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ja.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + デバッガーを既定のテスト ホストにアタッチできません。 diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ko.xlf index 3ccce228eb..50137f5c14 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ko.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + 기본 테스트 호스트에 디버거를 연결할 수 없습니다. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pl.xlf index 2b468231e6..e02bbccfb0 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pl.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Nie można dołączyć debugera do domyślnego hosta testowego. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pt-BR.xlf index 4b2ce75013..e7e5a733f4 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.pt-BR.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Não é possível anexar o depurador ao host de teste padrão. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ru.xlf index d53aaa5ac5..8f7a2d0de5 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.ru.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Не удается подключить отладчик к узлу тестирования по умолчанию. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.tr.xlf index 505c64f957..40827c9ca6 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.tr.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + Hata ayıklayıcı, varsayılan test ana bilgisayarına eklenemiyor. diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hans.xlf index 83acac20e9..6c2d278482 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hans.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + 无法将调试程序附加到默认测试主机。 diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hant.xlf index 3ff28dbd78..96410af596 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Resources/xlf/Resources.zh-Hant.xlf @@ -83,7 +83,7 @@ Cannot attach the debugger to the default test host. - Cannot attach the debugger to the default test host. + 無法將偵錯工具連結到預設測試主機。 diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf index e6c8dec431..26b0d791bb 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Ladicí program se nedá připojit k výchozímu hostiteli testů s ID procesu {0}. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf index bf5dbceca2..2ef7652f8f 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Der Debugger kann nicht an den Standardtesthost mit der Prozess-ID {0} angefügt werden. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf index ed13906318..e0f56661dd 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + No se puede asociar el depurador al host de prueba predeterminado con el id. de proceso: {0}. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf index 01b56d16a4..776f9d9059 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Impossible d'attacher le débogueur à l'hôte de test par défaut ayant l'ID de processus : {0}. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf index d0e4801854..cc27b23bae 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Non è possibile collegare il debugger all'host di test predefinito con ID processo {0}. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf index e036370c89..cf40c15ca4 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + デバッガーをプロセス ID: {0} の既定のテスト ホストにアタッチできません。 diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf index 138614b854..da1762741c 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + 프로세스 ID가 {0}인 기본 테스트 호스트에 디버거를 연결할 수 없습니다. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf index 749f3cc4a5..4cbade75c7 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Nie można dołączyć debugera do domyślnego hosta testowego z identyfikatorem procesu: {0}. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf index 44da41742a..3b6daa0e99 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Não é possível anexar o depurador ao host de teste padrão com a ID de processo: {0}. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf index 0ebcb9e5dd..0019acf1f1 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Не удается подключить отладчик к узлу тестирования по умолчанию с идентификатором процесса {0}. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf index 924a516fb4..9002b18d5e 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + Hata ayıklayıcı, {0} işlem kimliğine sahip varsayılan test ana bilgisayarına eklenemiyor. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf index e544a4d368..f58621c99c 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + 无法将调试程序附加到进程 ID 为“{0}”的默认测试主机。 diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf index 88ef56f6b7..a8b29cc527 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf @@ -209,7 +209,7 @@ Cannot attach the debugger to the default test host with process ID: {0}. - Cannot attach the debugger to the default test host with process ID: {0}. + 無法將偵錯工具連結到處理序識別碼為 {0} 的預設測試主機。 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 59a695626d..121aec7232 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.cs.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - Neočekávaná hodnota {0} zadaná pro ExpectedExecutionTimeOfLongestRunningTestInMinutes. Zadejte jako vstup kladné celé číslo. + Jako časový limit se přidala neočekávaná hodnota {0}. Zadejte prosím hodnotu v tomto formátu: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 ce989b3ded..8f55cedd73 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.de.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - Für "ExpectedExecutionTimeOfLongestRunningTestInMinutes" wurde der unerwartete Wert "{0}" angegeben. Geben Sie eine positive ganze Zahl als Eingabe an. + Unerwarteter Wert "{0}" als Timeout angegeben. Geben Sie einen Wert in folgendem Format an: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 775b4833bd..16f4d7e317 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.es.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - Se ha proporcionado un valor inesperado ({0}) para ExpectedExecutionTimeOfLongestRunningTestInMinutes. Debe especificar un entero positivo. + Valor inesperado "{0}" proporcionado como tiempo de espera. Indique un valor en este formato: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 ccc54830d8..1c1824d101 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.fr.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - Valeur {0} inattendue fournie pour ExpectedExecutionTimeOfLongestRunningTestInMinutes. Indiquez un entier positif en entrée. + Valeur inattendue '{0}' fournie en tant que délai d'expiration. Indiquez une valeur au format suivant : 1.5h / 90m / 5400s / 5400000ms / 5400000 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 e056f1eb98..bd8d4cb261 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.it.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - È stato specificato un valore imprevisto {0} per ExpectedExecutionTimeOfLongestRunningTestInMinutes. Immettere un numero intero positivo come valore di input. + Il valore '{0}', specificato come timeout, è imprevisto. Specificare un valore in questo formato: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 82d50680fc..85c40beaa7 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ja.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - ExpectedExecutionTimeOfLongestRunningTestInMinutes に予期しない値 {0} が指定されました。入力として正の整数を指定してください。 + 予期しない値 '{0}' がタイムアウトとして指定されました。次の形式で値を指定してください: 1.5h、90m、5400s、5400000ms、5400000 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 e59183b42a..8d7d9ee5e1 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ko.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - ExpectedExecutionTimeOfLongestRunningTestInMinutes에 대해 예기치 않은 값 {0}이(가) 제공되었습니다. 입력으로 양의 정수를 제공하세요. + 예기치 않은 값 '{0}'이(가) 시간 제한으로 제공되었습니다. 1.5h/90m/5400s/5400000ms/5400000 형식으로 값을 제공하세요. 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 83687ae1f3..896259e275 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.pl.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - Podano nieoczekiwaną wartość {0} dla elementu ExpectedExecutionTimeOfLongestRunningTestInMinutes. Wprowadź dodatnią liczbę całkowitą jako dane wejściowe. + Podano nieoczekiwaną wartość „{0}” jako limit czasu. Podaj wartość w następującym formacie: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 cc15b75a46..27eb3d8fd4 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 @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - Valor inesperado {0} fornecido para ExpectedExecutionTimeOfLongestRunningTestInMinutes. Forneça um inteiro positivo como entrada. + Valor inesperado '{0}' fornecido como tempo limite. Forneça um valor neste formato: 1.5h/90m/5400s/5400000ms/5400000 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 f6931b01aa..261885dd09 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.ru.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - Для ExpectedExecutionTimeOfLongestRunningTestInMinutes указано непредвиденное значение {0}. Введите положительное целое число в качестве входных данных. + В качестве времени ожидания указано непредвиденное значение "{0}". Укажите значение в следующем формате: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 7bb6ab7a9b..b8ae1b7b1f 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Resources/xlf/Resources.tr.xlf @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - ExpectedExecutionTimeOfLongestRunningTestInMinutes için beklenmeyen {0} değeri sağlandı. Lütfen giriş olarak pozitif bir tamsayı belirtin. + Zaman aşımı olarak beklenmeyen '{0}' değeri sağlandı. Lütfen şu biçimde bir değer girin: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 631689a5ea..7de8cbc49e 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 @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - 为 ExpectedExecutionTimeOfLongestRunningTestInMinutes 提供了意外值 {0}。请提供正整数作为输入。 + 提供了意外的值“{0}”作为超时。请按以下格式提供值: 1.5h / 90m / 5400s / 5400000ms / 5400000 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 61850e4f00..8eea946b4e 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 @@ -62,7 +62,7 @@ Unexpected value '{0}' provided as timeout. Please provide a value in this format: 1.5h / 90m / 5400s / 5400000ms / 5400000 - 為 ExpectedExecutionTimeOfLongestRunningTestInMinutes 提供了非預期的值 {0}。請提供正整數作為輸入。 + 提供了非預期的值 '{0}' 作為逾時。請提供以下格式的值: 1.5h / 90m / 5400s / 5400000ms / 5400000 diff --git a/src/Microsoft.TestPlatform.Utilities/CodeCoverageRunSettingsProcessor.cs b/src/Microsoft.TestPlatform.Utilities/CodeCoverageRunSettingsProcessor.cs new file mode 100644 index 0000000000..6e63832c43 --- /dev/null +++ b/src/Microsoft.TestPlatform.Utilities/CodeCoverageRunSettingsProcessor.cs @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.VisualStudio.TestPlatform.Utilities +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Xml; + using System.Xml.XPath; + + using Microsoft.VisualStudio.TestPlatform.ObjectModel; + + /// + /// Represents the run settings processor for code coverage data collectors. + /// + public class CodeCoverageRunSettingsProcessor + { + #region Members + /// + /// Represents the default settings loaded as an . + /// + private XmlNode defaultSettingsRootNode; + #endregion + + #region Constructors & Helpers + /// + /// Constructs an object. + /// + /// + /// The default settings root node. + public CodeCoverageRunSettingsProcessor(XmlNode defaultSettingsRootNode) + { + if (defaultSettingsRootNode == null) + { + throw new ArgumentNullException("Default settings root node is null."); + } + + this.defaultSettingsRootNode = defaultSettingsRootNode; + } + #endregion + + #region Public Interface + /// + /// Processes the current settings for the code coverage data collector. + /// + /// + /// The code coverage settings. + /// + /// An updated version of the current run settings. + public XmlNode Process(string currentSettings) + { + if (string.IsNullOrEmpty(currentSettings)) + { + return null; + } + + // Load current settings from string. + var document = new XmlDocument(); + document.LoadXml(currentSettings); + + return this.Process(document.DocumentElement); + } + + /// + /// Processes the current settings for the code coverage data collector. + /// + /// + /// + /// The code coverage settings document. + /// + /// + /// An updated version of the current run settings. + public XmlNode Process(XmlDocument currentSettingsDocument) + { + if (currentSettingsDocument == null) + { + return null; + } + + return this.Process(currentSettingsDocument.DocumentElement); + } + + /// + /// Processes the current settings for the code coverage data collector. + /// + /// + /// The code coverage root element. + /// + /// An updated version of the current run settings. + public XmlNode Process(XmlNode currentSettingsRootNode) + { + if (currentSettingsRootNode == null) + { + return null; + } + + // Get the code coverage node from the current settings. If unable to get any + // particular component down the path just add the default values for that component + // from the default settings document and return since there's nothing else to be done. + var codeCoveragePathComponents = new List() { "CodeCoverage" }; + var currentCodeCoverageNode = this.SelectNodeOrAddDefaults( + currentSettingsRootNode, + this.defaultSettingsRootNode, + codeCoveragePathComponents); + + // Cannot extract current code coverage node from the given settings so we bail out. + // However, the default code coverage node has already been added to the document's + // root. + if (currentCodeCoverageNode == null) + { + return currentSettingsRootNode; + } + + // Get the code coverage node from the default settings. + var defaultCodeCoverageNode = this.ExtractNode( + this.defaultSettingsRootNode, + this.BuildPath(codeCoveragePathComponents)); + + // Create the exclusion type list. + var exclusions = new List> + { + new List { "ModulePaths", "Exclude" }, + new List { "Attributes", "Exclude" }, + new List { "Sources", "Exclude" }, + new List { "Functions", "Exclude" } + }; + + foreach (var exclusion in exclusions) + { + // Get the node for the current exclusion type. If unable to get any + // particular component down the path just add the default values for that + // component from the default settings document and continue since there's nothing + // else to be done. + var currentNode = this.SelectNodeOrAddDefaults( + currentCodeCoverageNode, + defaultCodeCoverageNode, + exclusion); + + // Check if the node extraction was successful and we should process the current + // node in order to merge the current exclusion rules with the default ones. + if (currentNode == null) + { + continue; + } + + // Extract the node from the default settings. + var defaultNode = this.ExtractNode( + defaultCodeCoverageNode, + this.BuildPath(exclusion)); + + // Merge the current and default settings for the current exclusion rule. + this.MergeNodes(currentNode, defaultNode); + } + + return currentSettingsRootNode; + } + #endregion + + #region Private Methods + /// + /// Selects the node from the current settings node using the given + /// style path. If unable to select the requested node it adds + /// default settings along the path. + /// + /// + /// + /// The root node from the current settings document for the extraction. + /// + /// + /// The corresponding root node from the default settings document. + /// + /// The path components. + /// + /// The requested node if successful, otherwise. + private XmlNode SelectNodeOrAddDefaults( + XmlNode currentRootNode, + XmlNode defaultRootNode, + IList pathComponents) + { + var currentNode = currentRootNode; + var partialPath = new StringBuilder(); + + partialPath.Append("."); + + foreach (var component in pathComponents) + { + var currentPathComponent = "/" + component; + + // Append the current path component to the partial path. + partialPath.Append(currentPathComponent); + + // Extract the node corresponding to the latest path component. + var tempNode = this.ExtractNode(currentNode, "." + currentPathComponent); + + // Extraction is pruned here because we shouldn't be processing the current node. + if (tempNode != null && !this.ShouldProcessCurrentExclusion(tempNode)) + { + return null; + } + + // If the current node extraction is unsuccessful then add the corresponding + // default settings node and bail out. + if (tempNode == null) + { + var defaultNode = this.ExtractNode( + defaultRootNode, + partialPath.ToString()); + + var importedChild = currentNode.OwnerDocument.ImportNode(defaultNode, true); + currentNode.AppendChild(importedChild); + + return null; + } + + // Node corresponding to the latest path component is the new root node for the + // next extraction. + currentNode = tempNode; + } + + return currentNode; + } + + /// + /// Checks if we should process the current exclusion node. + /// + /// + /// The current exclusion node. + /// + /// + /// if the node should be processed, otherwise. + /// + private bool ShouldProcessCurrentExclusion(XmlNode node) + { + const string attributeName = "mergeDefaults"; + + foreach (XmlAttribute attribute in node.Attributes) + { + // If the attribute is present and set on 'false' we skip processing for the + // current exclusion. + if (attribute.Name == attributeName + && bool.TryParse(attribute.Value, out var value) + && !value) + { + return false; + } + } + + return true; + } + + /// + /// Assembles a relative path from the path given as components. + /// + /// + /// A relative path built from path components. + private string BuildPath(IList pathComponents) + { + return string.Join("/", new[] { "." }.Concat(pathComponents)); + } + + /// + /// Extracts the node specified by the current path using the provided node as root. + /// + /// + /// The root to be used for extraction. + /// The path used to specify the requested node. + /// + /// The extracted node if successful, otherwise. + private XmlNode ExtractNode(XmlNode node, string path) + { + try + { + return node.SelectSingleNode(path); + } + catch (XPathException ex) + { + EqtTrace.Error( + "CodeCoverageRunSettingsProcessor.ExtractNode: Cannot select single node \"{0}\".", + ex.Message); + } + + return null; + } + + /// + /// Merges the current settings rules with the default settings rules. + /// + /// + /// The current settings root node. + /// The default settings root node. + private void MergeNodes(XmlNode currentNode, XmlNode defaultNode) + { + var exclusionCache = new HashSet(); + + // Add current exclusions to the exclusion cache. + foreach (XmlNode child in currentNode.ChildNodes) + { + exclusionCache.Add(child.OuterXml); + } + + // Iterate through default exclusions and import missing ones. + foreach (XmlNode child in defaultNode.ChildNodes) + { + if (exclusionCache.Contains(child.OuterXml)) + { + continue; + } + + // Import missing default exclusions. + var importedChild = currentNode.OwnerDocument.ImportNode(child, true); + currentNode.AppendChild(importedChild); + } + } + #endregion + } +} diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index 91f277dfea..1de3fe00af 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - Možnost CollectDump pro Blame není pro tuto platformu podporovaná. + Shromažďování výpisů stavu systému pomocí možnosti CollectDump pro Blame se pro tuto platformu nepodporuje. @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + Shromažďování výpisů stavu systému při zablokování pomocí možnosti CollectDump s TestTimeout pro Blame se pro tuto platformu nepodporuje. diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index 7c6f616094..ed086d9ef5 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - Die CollectDump-Option für Blame wird für diese Plattform nicht unterstützt. + Das Sammeln von Absturzabbildern über die Option "CollectDump" für "Blame" wird für diese Plattform nicht unterstützt. @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + Das Sammeln von Abbildern bei Reaktionsunfähigkeit über die Option "CollectDump" mit "TestTimeout" für "Blame" wird für diese Plattform nicht unterstützt. diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index f4c78a54fc..7af35efa5e 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1591,7 +1591,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - No se admite la opción CollectDump para Blame en esta plataforma. + La recopilación de volcados de memoria mediante la opción CollectDump para Blame no se admite en esta plataforma. @@ -1668,7 +1668,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + La recopilación de volcados de memoria mediante la opción CollectDump con TestTimeout para Blame no se admite en esta plataforma. diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index 79180cd137..c626818a1f 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - L'option CollectDump pour Blame n'est pas prise en charge pour cette plateforme. + La collecte des vidages sur incident à l'aide de l'option CollectDump pour Blame n'est pas prise en charge pour cette plateforme. @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + La collecte des vidages sur blocage par l'option CollectDump avec TestTimeout pour Blame n'est pas prise en charge pour cette plateforme. diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index a3731612c8..74c347f393 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - L'opzione CollectDump per Blame non è supportata per questa piattaforma. + L'opzione CollectDump per Blame non supporta la raccolta dei dump di arresto anomalo del sistema per questa piattaforma. @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + L'opzione CollectDump con TestTimeout per Blame non supporta la raccolta dei dump di blocco per questa piattaforma. diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index 316747b07e..28435e0170 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - このプラットフォームでは、Blame の CollectDump オプションはサポートされていません。 + このプラットフォームでは、Blame の CollectDump オプションによるクラッシュ ダンプの収集はサポートされていません。 @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + このプラットフォームでは、Blame の TestTimeout を使用する CollectDump オプションによるハング ダンプの収集はサポートされていません。 diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index 00c2886a12..7de0eb8a47 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - Blame에 대한 CollectDump 옵션이 이 플랫폼에서 지원되지 않습니다. + Blame에 대한 CollectDump 옵션에 의한 크래시 덤프 수집은 이 플랫폼에서 지원되지 않습니다. @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + Blame에 대한 TestTimeout이 있는 CollectDump 옵션에 의한 중단 덤프 수집은 이 플랫폼에서 지원되지 않습니다. diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index c96422c0af..93a0e70be6 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - Opcja CollectDump dla narzędzia Blame nie jest obsługiwana na tej platformie. + Zbieranie zrzutów awaryjnych przez opcję CollectDump programu Blame nie jest obsługiwane w przypadku tej platformy. @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + Zbieranie zrzutów po zawieszeniu przez opcję CollectDump z opcją TestTimeout programu Blame nie jest obsługiwane w przypadku tej platformy. diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index 09af9d0d06..fda0e98a72 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1588,7 +1588,7 @@ Altere o prefixo de nível de diagnóstico do agente de console, como mostrado a Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - A opção CollectDump para Blame não é compatível com esta plataforma. + A coleta de despejos de memória pela opção CollectDump para Blame não tem suporte nesta plataforma. @@ -1665,7 +1665,7 @@ Altere o prefixo de nível de diagnóstico do agente de console, como mostrado a Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + A coleta de despejos de trava pela opção CollectDump com TestTimeout para Blame não é tem suporte para esta plataforma. diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index 6b565e8df6..ed6ce4bfd7 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - Параметр CollectDump для Blame не поддерживается на этой платформе. + Сбор аварийных дампов с помощью параметра CollectDump для Blame не поддерживается для этой платформы. @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + Сбор дампов зависаний с помощью параметра CollectDump с TestTimeout для Blame не поддерживается для этой платформы. diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index 1f5cc57c62..485fd30a57 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1588,7 +1588,7 @@ Günlükler için izleme düzeyini aşağıda gösterildiği gibi değiştirin Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - Blame için CollectDump seçeneği bu platformda desteklenmez. + Blame için CollectDump seçeneğine göre kilitlenme bilgi dökümlerinin toplanması bu platform için desteklenmiyor. @@ -1665,7 +1665,7 @@ Günlükler için izleme düzeyini aşağıda gösterildiği gibi değiştirin Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + Blame için TestTimeout ile CollectDump seçeneğine göre asılı kalma bilgi dökümlerinin toplanması bu platform için desteklenmiyor. diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index adbf83e90d..c53aa96c37 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1588,7 +1588,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - 此平台不支持用于追责的 CollectDump 选项。 + 此平台不支持通过 CollectDump for Blame 选项收集故障转储。 @@ -1665,7 +1665,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + 此平台不支持通过 CollectDump with TestTimeout for Blame 选项收集挂起转储。 diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index 4ab044cf95..8c443a5598 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1589,7 +1589,7 @@ Collecting crash dumps by option CollectDump for Blame is not supported for this platform. - 對此平台不支援 Blame 的 CollectDump 選項。 + 此平台不支援使用 CollectDump for Blame 選項收集損毀傾印。 @@ -1666,7 +1666,7 @@ Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. - Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform. + 此平台不支援使用 Blame 的 CollectDump 及 TestTimeout 選項收集懸置傾印。 diff --git a/test/DataCollectors/TraceDataCollector.UnitTests/DynamicCoverageDataCollectorImplTests.cs b/test/DataCollectors/TraceDataCollector.UnitTests/DynamicCoverageDataCollectorImplTests.cs index 82d2ee58aa..65b3610833 100644 --- a/test/DataCollectors/TraceDataCollector.UnitTests/DynamicCoverageDataCollectorImplTests.cs +++ b/test/DataCollectors/TraceDataCollector.UnitTests/DynamicCoverageDataCollectorImplTests.cs @@ -4,6 +4,7 @@ namespace Microsoft.VisualStudio.TraceDataCollector.UnitTests { using System; + using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.IO; @@ -85,9 +86,8 @@ public void InitializeShouldCreateDefaultCodeCoverageSettingsIfConfigElementIsNu [TestMethod] public void InitializeShouldInitializeVanguardWithRightCoverageSettings() { - var expectedContent = "CoverageSettingsContent"; XmlElement configElement = - DynamicCoverageDataCollectorImplTests.CreateXmlElement($"{expectedContent}"); + DynamicCoverageDataCollectorImplTests.CreateXmlElement(@""); this.directoryHelperMock.Setup(d => d.CreateDirectory(It.IsAny())) .Callback((path) => @@ -101,8 +101,20 @@ public void InitializeShouldInitializeVanguardWithRightCoverageSettings() this.collectorImpl.Initialize(configElement, this.dataCollectionSinkMock.Object, this.dataCollectionLoggerMock.Object); + XmlDocument defaultDocument = new XmlDocument(); + defaultDocument.LoadXml(DynamicCoverageDataCollectorImplTests.GetDefaultCodeCoverageConfig()); + Assert.AreEqual(DynamicCoverageDataCollectorImplTests.DefaultConfigFileName, Path.GetFileName(this.aConfigFileName)); - Assert.AreEqual(expectedContent, File.ReadAllText(this.aConfigFileName)); + + XmlDocument currentDocument = new XmlDocument(); + currentDocument.LoadXml(File.ReadAllText(this.aConfigFileName)); + + var codeCoverageNodes = new Tuple(currentDocument.DocumentElement, defaultDocument.DocumentElement); + + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./ModulePaths/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Functions/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Attributes/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Sources/Exclude"); } [TestMethod] @@ -374,6 +386,58 @@ private void CompareWithDefaultConfig() File.ReadAllText(this.aConfigFileName).Replace(" ", string.Empty).Replace(Environment.NewLine, string.Empty)); } + private XmlNode ExtractNode(XmlNode node, string path) + { + try + { + return node.SelectSingleNode(path); + } + catch + { + } + + return null; + } + + private Tuple ExtractNodes(XmlNode currentSettingsRoot, XmlNode defaultSettingsRoot, string path) + { + var currentNode = this.ExtractNode(currentSettingsRoot, path); + var defaultNode = this.ExtractNode(defaultSettingsRoot, path); + Assert.IsNotNull(currentNode); + Assert.IsNotNull(defaultNode); + + return new Tuple(currentNode, defaultNode); + } + + private void CompareResults(XmlNode currentSettingsRoot, XmlNode defaultSettingsRoot, string path) + { + var nodes = this.ExtractNodes(currentSettingsRoot, defaultSettingsRoot, path); + + Assert.AreEqual(nodes.Item1.ChildNodes.Count, nodes.Item2.ChildNodes.Count); + + var set = new HashSet(); + foreach (XmlNode child in nodes.Item1.ChildNodes) + { + if (!set.Contains(child.OuterXml)) + { + set.Add(child.OuterXml); + } + } + + foreach (XmlNode child in nodes.Item2.ChildNodes) + { + if (!set.Contains(child.OuterXml)) + { + set.Add(child.OuterXml); + continue; + } + + set.Remove(child.OuterXml); + } + + Assert.AreEqual(set.Count, 0); + } + #endregion } } diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/CodeCoverageRunSettingsProcessorTests.cs b/test/Microsoft.TestPlatform.Utilities.UnitTests/CodeCoverageRunSettingsProcessorTests.cs new file mode 100644 index 0000000000..7968ccee59 --- /dev/null +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/CodeCoverageRunSettingsProcessorTests.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.TestPlatform.Utilities.UnitTests +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Reflection; + using System.Xml; + using Microsoft.VisualStudio.TestPlatform.Utilities; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + public class CodeCoverageRunSettingsProcessorTests + { + #region Members + private XmlElement defaultSettings; + + private CodeCoverageRunSettingsProcessor processor; + #endregion + + #region Constructors + public CodeCoverageRunSettingsProcessorTests() + { + this.defaultSettings = this.GetDefaultConfiguration(); + this.processor = new CodeCoverageRunSettingsProcessor(this.defaultSettings); + } + #endregion + + #region Test Methods + [TestMethod] + public void ProcessingShouldReturnNullForNullOrEmptySettings() + { + Assert.IsNull(processor.Process((string)null)); + Assert.IsNull(processor.Process("")); + + Assert.IsNull(processor.Process((XmlNode)null)); + + Assert.IsNull(processor.Process((XmlDocument)null)); + } + + [TestMethod] + public void MissingCodeCoverageTagShouldAddDefaultTag() + { + const string settings = ""; + string expected = $"{this.defaultSettings.OuterXml}"; + + Assert.AreEqual(expected, processor.Process(settings).OuterXml); + } + + [TestMethod] + public void EmptyCodeCoverageTagShouldAddDefaultTag() + { + const string settings = ""; + var processedNode = processor.Process(settings); + Assert.IsNotNull(processedNode); + + var codeCoverageNodes = this.ExtractNodes(processedNode, this.defaultSettings, "./CodeCoverage"); + + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./ModulePaths/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Functions/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Attributes/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Sources/Exclude"); + } + + [TestMethod] + public void MergeDefaultsDisabledShouldReturnInputUnaltered() + { + var settings = string.Join( + Environment.NewLine, + @"", + @" ", + @" ", + @" ", + @" ", + @" ", + @" ", + @" ", + @" .*\\atlmfc\\.*", + @" .*\\atlmbfc\\.*", + @" .*\\vctools\\.*", + @" .*\\public\\sdk2\\.*", + @" .*\\externalapis\\.*", + @" .*\\microsoft sdks\\.*", + @" .*\\vc\\include\\.*", + @" .*\\msclr\\.*", + @" .*\\ucrt\\.*", + @" ", + @" ", + @" ", + @" ", + @""); + + var document = new XmlDocument(); + document.LoadXml(settings); + + Assert.AreEqual(document.OuterXml, processor.Process(settings).OuterXml); + } + + [TestMethod] + public void MixedTestShouldCorrectlyAddMissingTags() + { + var settings = string.Join( + Environment.NewLine, + @"", + @" ", + @" ", + @" ", + @" ", + @" ", + @" ", + @" ", + @" .*\\atlmfc\\.*", + @" .*\\atlmbfc\\.*", + @" .*\\vctools\\.*", + @" .*\\public\\sdk2\\.*", + @" .*\\externalapis\\.*", + @" .*\\microsoft sdks\\.*", + @" .*\\vc\\include\\.*", + @" .*\\msclr\\.*", + @" .*\\ucrt\\.*", + @" ", + @" ", + @" ", + @""); + + var expectedResult = string.Join( + Environment.NewLine, + @"", + @" ", + @" ", + @" ", + @" .*CPPUnitTestFramework.*", + @" .*vstest.console.*", + @" .*microsoft.intellitrace.*", + @" .*testhost.*", + @" .*datacollector.*", + @" .*microsoft.teamfoundation.testplatform.*", + @" .*microsoft.visualstudio.testplatform.*", + @" .*microsoft.visualstudio.testwindow.*", + @" .*microsoft.visualstudio.mstest.*", + @" .*microsoft.visualstudio.qualitytools.*", + @" .*microsoft.vssdk.testhostadapter.*", + @" .*microsoft.vssdk.testhostframework.*", + @" .*qtagent32.*", + @" .*msvcr.*dll$", + @" .*msvcp.*dll$", + @" .*clr.dll$", + @" .*clr.ni.dll$", + @" .*clrjit.dll$", + @" .*clrjit.ni.dll$", + @" .*mscoree.dll$", + @" .*mscoreei.dll$", + @" .*mscoreei.ni.dll$", + @" .*mscorlib.dll$", + @" .*mscorlib.ni.dll$", + @" .*cryptbase.dll$", + @" .*bcryptPrimitives.dll$", + @" ", + @" ", + @" ", + @" ", + @" ^std::.*", + @" ^ATL::.*", + @" .*::__GetTestMethodInfo.*", + @" .*__CxxPureMSILEntry.*", + @" ^Microsoft::VisualStudio::CppCodeCoverageFramework::.*", + @" ^Microsoft::VisualStudio::CppUnitTestFramework::.*", + @" .*::YOU_CAN_ONLY_DESIGNATE_ONE_.*", + @" ^__.*", + @" .*::__.*", + @" ", + @" ", + @" ", + @" ", + @" ^System.Diagnostics.DebuggerHiddenAttribute$", + @" ^System.Diagnostics.DebuggerNonUserCodeAttribute$", + @" System.Runtime.CompilerServices.CompilerGeneratedAttribute$", + @" ^System.CodeDom.Compiler.GeneratedCodeAttribute$", + @" ^System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute$", + @" ^Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode.*", + @" ", + @" ", + @" ", + @" ", + @" .*\\atlmfc\\.*", + @" .*\\atlmbfc\\.*", + @" .*\\vctools\\.*", + @" .*\\public\\sdk2\\.*", + @" .*\\externalapis\\.*", + @" .*\\microsoft sdks\\.*", + @" .*\\vc\\include\\.*", + @" .*\\msclr\\.*", + @" .*\\ucrt\\.*", + @" .*\\public\\sdk\\.*", + @" ", + @" ", + @" ", + @""); + + var expectedResultDocument = new XmlDocument(); + expectedResultDocument.LoadXml(expectedResult); + + var processedNode = processor.Process(settings); + Assert.IsNotNull(processedNode); + + var codeCoverageNodes = this.ExtractNodes(processedNode, expectedResultDocument.DocumentElement, "./CodeCoverage"); + + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./ModulePaths/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Functions/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Attributes/Exclude"); + this.CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Sources/Exclude"); + } + #endregion + + #region Helpers + private XmlNode ExtractNode(XmlNode node, string path) + { + try + { + return node.SelectSingleNode(path); + } + catch + { + } + + return null; + } + + private XmlElement GetDefaultConfiguration() + { + var document = new XmlDocument(); + Assembly assembly = typeof(CodeCoverageRunSettingsProcessorTests).GetTypeInfo().Assembly; + using (Stream stream = assembly.GetManifestResourceStream( + "Microsoft.TestPlatform.Utilities.UnitTests.DefaultCodeCoverageConfig.xml")) + { + document.Load(stream); + } + + return document.DocumentElement; + } + + private Tuple ExtractNodes(XmlNode currentSettingsRoot, XmlNode defaultSettingsRoot, string path) + { + var currentNode = this.ExtractNode(currentSettingsRoot, path); + var defaultNode = this.ExtractNode(defaultSettingsRoot, path); + Assert.IsNotNull(currentNode); + Assert.IsNotNull(defaultNode); + + return new Tuple(currentNode, defaultNode); + } + + private void CompareResults(XmlNode currentSettingsRoot, XmlNode defaultSettingsRoot, string path) + { + var nodes = this.ExtractNodes(currentSettingsRoot, defaultSettingsRoot, path); + + Assert.AreEqual(nodes.Item1.ChildNodes.Count, nodes.Item2.ChildNodes.Count); + + var set = new HashSet(); + foreach (XmlNode child in nodes.Item1.ChildNodes) + { + if (!set.Contains(child.OuterXml)) + { + set.Add(child.OuterXml); + } + } + + foreach (XmlNode child in nodes.Item2.ChildNodes) + { + if (!set.Contains(child.OuterXml)) + { + set.Add(child.OuterXml); + continue; + } + + set.Remove(child.OuterXml); + } + + Assert.AreEqual(set.Count, 0); + } + #endregion + } +} diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/DefaultCodeCoverageConfig.xml b/test/Microsoft.TestPlatform.Utilities.UnitTests/DefaultCodeCoverageConfig.xml new file mode 100644 index 0000000000..3bc0b33877 --- /dev/null +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/DefaultCodeCoverageConfig.xml @@ -0,0 +1,77 @@ + + + + + + .*CPPUnitTestFramework.* + .*vstest.console.* + .*microsoft.intellitrace.* + .*testhost.* + .*datacollector.* + .*microsoft.teamfoundation.testplatform.* + .*microsoft.visualstudio.testplatform.* + .*microsoft.visualstudio.testwindow.* + .*microsoft.visualstudio.mstest.* + .*microsoft.visualstudio.qualitytools.* + .*microsoft.vssdk.testhostadapter.* + .*microsoft.vssdk.testhostframework.* + .*qtagent32.* + .*msvcr.*dll$ + .*msvcp.*dll$ + .*clr.dll$ + .*clr.ni.dll$ + .*clrjit.dll$ + .*clrjit.ni.dll$ + .*mscoree.dll$ + .*mscoreei.dll$ + .*mscoreei.ni.dll$ + .*mscorlib.dll$ + .*mscorlib.ni.dll$ + .*cryptbase.dll$ + .*bcryptPrimitives.dll$ + + + True + True + True + false + + + + ^std::.* + ^ATL::.* + .*::__GetTestMethodInfo.* + .*__CxxPureMSILEntry.* + ^Microsoft::VisualStudio::CppCodeCoverageFramework::.* + ^Microsoft::VisualStudio::CppUnitTestFramework::.* + .*::YOU_CAN_ONLY_DESIGNATE_ONE_.* + ^__.* + .*::__.* + + + + + ^System.Diagnostics.DebuggerHiddenAttribute$ + ^System.Diagnostics.DebuggerNonUserCodeAttribute$ + System.Runtime.CompilerServices.CompilerGeneratedAttribute$ + ^System.CodeDom.Compiler.GeneratedCodeAttribute$ + ^System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute$ + ^Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode.* + + + + + .*\\atlmfc\\.* + .*\\vctools\\.* + .*\\public\\sdk\\.* + .*\\externalapis\\.* + .*\\microsoft sdks\\.* + .*\\vc\\include\\.* + .*\\msclr\\.* + .*\\ucrt\\.* + + + + + + \ No newline at end of file diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/Microsoft.TestPlatform.Utilities.UnitTests.csproj b/test/Microsoft.TestPlatform.Utilities.UnitTests/Microsoft.TestPlatform.Utilities.UnitTests.csproj index b123a6bb4c..d0c2957dff 100644 --- a/test/Microsoft.TestPlatform.Utilities.UnitTests/Microsoft.TestPlatform.Utilities.UnitTests.csproj +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/Microsoft.TestPlatform.Utilities.UnitTests.csproj @@ -24,5 +24,8 @@ + + +