diff --git a/Directory.Build.props b/Directory.Build.props index 81e8489fd4..ce63537502 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -40,12 +40,11 @@ - alpha - 1.0.0 + alpha @@ -70,6 +69,12 @@ true + + + + TestingPlatformRunner + + diff --git a/Directory.Packages.props b/Directory.Packages.props index 2447431037..2b8b2566a2 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -37,6 +37,7 @@ + diff --git a/TestFx.sln b/TestFx.sln index ef5738fbb2..622210e8ed 100644 --- a/TestFx.sln +++ b/TestFx.sln @@ -72,6 +72,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IntegrationTests", "Integra EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestAssets", "TestAssets", "{C9F82701-0E0F-4E61-B05B-AE387E7631F6}" ProjectSection(SolutionItems) = preProject + test\IntegrationTests\TestAssets\Directory.Build.props = test\IntegrationTests\TestAssets\Directory.Build.props test\IntegrationTests\TestAssets\Directory.Build.targets = test\IntegrationTests\TestAssets\Directory.Build.targets EndProjectSection EndProject diff --git a/samples/Playground/Playground.csproj b/samples/Playground/Playground.csproj index b8570b8348..136fbdad91 100644 --- a/samples/Playground/Playground.csproj +++ b/samples/Playground/Playground.csproj @@ -20,7 +20,6 @@ - diff --git a/src/Adapter/MSTest.TestAdapter/Helpers/FixtureMethodRunner.cs b/src/Adapter/MSTest.TestAdapter/Helpers/FixtureMethodRunner.cs index 6653057879..8b5888c642 100644 --- a/src/Adapter/MSTest.TestAdapter/Helpers/FixtureMethodRunner.cs +++ b/src/Adapter/MSTest.TestAdapter/Helpers/FixtureMethodRunner.cs @@ -12,6 +12,24 @@ namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers; internal static class FixtureMethodRunner { + internal static void RunOnContext(ExecutionContext? executionContext, Action action) + { + if (executionContext is null) + { + action(); + } + else + { + // CreateCopy doesn't do anything on .NET Core as ExecutionContexts are immutable. + // But it's important on .NET Framework. + // On .NET Framework, ExecutionContext.Run cannot be called twice with the same ExecutionContext. + // Otherwise, it will throw InvalidOperationException with message: + // Cannot apply a context that has been marshaled across AppDomains, that was not acquired through a Capture operation or that has already been the argument to a Set call. + executionContext = executionContext.CreateCopy(); + ExecutionContext.Run(executionContext, static action => ((Action)action!).Invoke(), action); + } + } + internal static TestFailedException? RunWithTimeoutAndCancellation( Action action, CancellationTokenSource cancellationTokenSource, TimeoutInfo? timeoutInfo, MethodInfo methodInfo, ExecutionContext? executionContext, string methodCanceledMessageFormat, string methodTimedOutMessageFormat, diff --git a/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj b/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj index 9574cbfe6e..6170c0f259 100644 --- a/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj +++ b/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj @@ -54,7 +54,8 @@ - + Analyzer false diff --git a/src/Analyzers/MSTest.Analyzers.Package/MSTest.Analyzers.Package.csproj b/src/Analyzers/MSTest.Analyzers.Package/MSTest.Analyzers.Package.csproj index dbeb1dfb27..c4d90bd485 100644 --- a/src/Analyzers/MSTest.Analyzers.Package/MSTest.Analyzers.Package.csproj +++ b/src/Analyzers/MSTest.Analyzers.Package/MSTest.Analyzers.Package.csproj @@ -22,8 +22,8 @@ - - + + diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf index d40df19f9c..7d2f8fdf1e 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf @@ -19,7 +19,7 @@ The type declaring these methods should also respect the following rules: -The class shouldn't be 'static' -The class should be marked with '[TestClass]' (or a derived attribute) -the class should not be generic. - Aby byly metody s označením [AssemblyCleanup] platné, musí se řídit následujícím rozložením: + Aby byly metody s označením [AssemblyCleanup] platné, musí se řídit následujícím rozložením: – Nesmí být deklarované pro obecnou třídu. – Musí být public. – Musí být static. @@ -29,7 +29,7 @@ The type declaring these methods should also respect the following rules: – Nesmí přijímat žádný parametr, nebo musí přijímat jediný parametr typu TestContext. – Návratový typ musí být void, Task nebo ValueTask. -Typ deklarující tyto metody by měl také respektovat následující pravidla: +Typ deklarující tyto metody by měl také respektovat následující pravidla: – Typ by měl být třída. – Třída by měla být public nebo internal (pokud testovací projekt používá atribut [DiscoverInternals]). – Třída by neměla být static. @@ -64,7 +64,7 @@ The type declaring these methods should also respect the following rules: -The class shouldn't be 'static' -The class should be marked with '[TestClass]' (or a derived attribute) -the class should not be generic. - Aby byly metody s označením [AssemblyInitialize] platné, musí se řídit následujícím rozložením: + Aby byly metody s označením [AssemblyInitialize] platné, musí se řídit následujícím rozložením: – Nesmí být deklarované pro obecnou třídu. – Musí být public. – Musí být static. @@ -74,7 +74,7 @@ The type declaring these methods should also respect the following rules: – Musí mít jeden parametr typu TestContext. – Návratový typ musí být void, Task nebo ValueTask. -Typ deklarující tyto metody by měl také respektovat následující pravidla: +Typ deklarující tyto metody by měl také respektovat následující pravidla: – Typ by měl být třída. – Třída by měla být public nebo internal (pokud testovací projekt používá atribut [DiscoverInternals]). – Třída by neměla být static. @@ -181,7 +181,7 @@ The type declaring these methods should also respect the following rules: -The class shouldn't be 'static' -If the class is 'sealed', it should be marked with '[TestClass]' (or a derived attribute) -the class should not be generic. - Aby byly metody s označením [ClassCleanup] platné, musí se řídit následujícím rozložením: + Aby byly metody s označením [ClassCleanup] platné, musí se řídit následujícím rozložením: – Nesmí být deklarované pro obecnou třídu bez nastavení režimu InheritanceBehavior. – Musí být public. – Musí být static. @@ -193,7 +193,7 @@ The type declaring these methods should also respect the following rules: – V případě třídy abstract by měl být zadán parametr atributu InheritanceBehavior.BeforeEachDerivedClass. – V případě třídy sealed by neměl být zadán parametr atributu InheritanceBehavior.BeforeEachDerivedClass. -Typ deklarující tyto metody by měl také respektovat následující pravidla: +Typ deklarující tyto metody by měl také respektovat následující pravidla: – Typ by měl být třída. – Třída by měla být public nebo internal (pokud testovací projekt používá atribut [DiscoverInternals]). – Třída by neměla být static. @@ -230,7 +230,7 @@ The type declaring these methods should also respect the following rules: -The class shouldn't be 'static' -If the class is 'sealed', it should be marked with '[TestClass]' (or a derived attribute) -the class should not be generic. - Aby byly metody s označením [ClassInitialize] platné, musí se řídit následujícím rozložením: + Aby byly metody s označením [ClassInitialize] platné, musí se řídit následujícím rozložením: – Nesmí být deklarované pro obecnou třídu bez nastavení režimu InheritanceBehavior. – Musí být public. – Musí být static. @@ -242,7 +242,7 @@ The type declaring these methods should also respect the following rules: – V případě třídy abstract by měl být zadán parametr atributu InheritanceBehavior.BeforeEachDerivedClass. – V případě třídy sealed by neměl být zadán parametr atributu InheritanceBehavior.BeforeEachDerivedClass. -Typ deklarující tyto metody by měl také respektovat následující pravidla: +Typ deklarující tyto metody by měl také respektovat následující pravidla: – Typ by měl být třída. – Třída by měla být public nebo internal (pokud testovací projekt používá atribut [DiscoverInternals]). – Třída by neměla být static. @@ -594,7 +594,7 @@ The type declaring these methods should also respect the following rules: -The class should be 'public' or 'internal' (if the test project is using the '[DiscoverInternals]' attribute) -The class shouldn't be 'static' -If the class is 'sealed', it should be marked with '[TestClass]' (or a derived attribute). - Aby byly metody s označením [TestCleanup] platné, musí se řídit následujícím rozložením: + Aby byly metody s označením [TestCleanup] platné, musí se řídit následujícím rozložením: – Musí být public. – Nesmí být abstract. – Nesmí být async void. @@ -604,7 +604,7 @@ The type declaring these methods should also respect the following rules: – Nesmí přijímat žádný parametr. – Návratový typ musí být void, Task nebo ValueTask. -Typ deklarující tyto metody by měl také respektovat následující pravidla: +Typ deklarující tyto metody by měl také respektovat následující pravidla: – Typ by měl být třída. – Třída by měla být public nebo internal (pokud testovací projekt používá atribut [DiscoverInternals]). – Třída by neměla být static. @@ -653,7 +653,7 @@ The type declaring these methods should also respect the following rules: -The class should be 'public' or 'internal' (if the test project is using the '[DiscoverInternals]' attribute) -The class shouldn't be 'static' -If the class is 'sealed', it should be marked with '[TestClass]' (or a derived attribute). - Aby byly metody s označením [TestInitialize] platné, musí se řídit následujícím rozložením: + Aby byly metody s označením [TestInitialize] platné, musí se řídit následujícím rozložením: – Musí být public. – Nesmí být abstract. – Nesmí být async void. @@ -663,7 +663,7 @@ The type declaring these methods should also respect the following rules: – Nesmí přijímat žádný parametr. – Návratový typ musí být void, Task nebo ValueTask. -Typ deklarující tyto metody by měl také respektovat následující pravidla: +Typ deklarující tyto metody by měl také respektovat následující pravidla: – Typ by měl být třída. – Třída by měla být public nebo internal (pokud testovací projekt používá atribut [DiscoverInternals]). – Třída by neměla být static. @@ -821,4 +821,4 @@ Typ deklarující tyto metody by měl také respektovat následující pravidla: - \ No newline at end of file + diff --git a/src/Package/MSTest/MSTest.csproj b/src/Package/MSTest/MSTest.csproj index ecbba42c9e..9cbf21eeab 100644 --- a/src/Package/MSTest/MSTest.csproj +++ b/src/Package/MSTest/MSTest.csproj @@ -1,4 +1,4 @@ - + @@ -44,10 +44,15 @@ - - - - + + + + diff --git a/src/Platform/Microsoft.Testing.Extensions.CrashDump/Microsoft.Testing.Extensions.CrashDump.csproj b/src/Platform/Microsoft.Testing.Extensions.CrashDump/Microsoft.Testing.Extensions.CrashDump.csproj index 6d7d59466d..8689742ba7 100644 --- a/src/Platform/Microsoft.Testing.Extensions.CrashDump/Microsoft.Testing.Extensions.CrashDump.csproj +++ b/src/Platform/Microsoft.Testing.Extensions.CrashDump/Microsoft.Testing.Extensions.CrashDump.csproj @@ -37,7 +37,6 @@ This package extends Microsoft Testing Platform to provide a crash dump function - diff --git a/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Microsoft.Testing.Extensions.VSTestBridge.csproj b/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Microsoft.Testing.Extensions.VSTestBridge.csproj index fd51a85275..d63e936c2c 100644 --- a/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Microsoft.Testing.Extensions.VSTestBridge.csproj +++ b/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Microsoft.Testing.Extensions.VSTestBridge.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/Platform/Microsoft.Testing.Platform.MSBuild/Microsoft.Testing.Platform.MSBuild.csproj b/src/Platform/Microsoft.Testing.Platform.MSBuild/Microsoft.Testing.Platform.MSBuild.csproj index 3d9603f9a6..741aeb4c07 100644 --- a/src/Platform/Microsoft.Testing.Platform.MSBuild/Microsoft.Testing.Platform.MSBuild.csproj +++ b/src/Platform/Microsoft.Testing.Platform.MSBuild/Microsoft.Testing.Platform.MSBuild.csproj @@ -18,7 +18,8 @@ - + diff --git a/src/Platform/Microsoft.Testing.Platform/Messages/TestNodeProperties.cs b/src/Platform/Microsoft.Testing.Platform/Messages/TestNodeProperties.cs index 858f1b53a0..b210a0fb1c 100644 --- a/src/Platform/Microsoft.Testing.Platform/Messages/TestNodeProperties.cs +++ b/src/Platform/Microsoft.Testing.Platform/Messages/TestNodeProperties.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using Microsoft.Testing.Platform.TestHost; + namespace Microsoft.Testing.Platform.Extensions.Messages; /// diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index 2980dfd99e..9581dc6426 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -36,6 +36,7 @@ + diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs index c298349c7a..c3a418f10d 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs @@ -36,22 +36,22 @@ public async Task TestDifferentGenericMethodTestCases() Assert\.Fail failed\. Test method 'ParameterizedMethodSimple' did run with parameter 'Hello world' and type 'System\.String'\. .+? failed ParameterizedMethodSimple \(null\) \(\d+ms\) - Test method TestClass\.ParameterizedMethodSimple threw exception: + Test method TestClass\.ParameterizedMethodSimple threw exception: System\.InvalidOperationException: The type of the generic parameter 'T' could not be inferred\. .+? failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters \(1,"Hello world",2,3\) \(\d+ms\) - Test method TestClass\.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception: + Test method TestClass\.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception: System\.InvalidOperationException: Found two conflicting types for generic parameter 'T2'\. The conflicting types are 'System\.Byte' and 'System\.Int32'\. .+? failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters \(null,"Hello world","Hello again",3\) \(\d+ms\) Assert\.Fail failed\. Test method 'ParameterizedMethodTwoGenericParametersAndFourMethodParameters' did run with parameters '', 'Hello world', 'Hello again', '3' and generic types 'System\.Int32', 'System\.String'\. .+? failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters \("Hello hello","Hello world",null,null\) \(\d+ms\) - Test method TestClass\.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception: + Test method TestClass\.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception: System\.InvalidOperationException: The type of the generic parameter 'T1' could not be inferred\. .+? failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters \(null,null,null,null\) \(\d+ms\) - Test method TestClass\.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception: + Test method TestClass\.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception: System\.InvalidOperationException: The type of the generic parameter 'T1' could not be inferred\. .+? failed ParameterizedMethodSimpleParams \(1\) \(\d+ms\) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/Program.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/Program.cs index 7c4a16519f..4c83020575 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/Program.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/Program.cs @@ -18,8 +18,10 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddHangDumpProvider(); +builder.AddAppInsightsTelemetryProvider(); builder.AddCrashDumpProvider(ignoreIfNotSupported: true); +builder.AddHangDumpProvider(); +builder.AddRetryProvider(); builder.AddTrxReportProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Program.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Program.cs index 54c9e40407..1f45019912 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Program.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Program.cs @@ -18,9 +18,9 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddHangDumpProvider(); +builder.AddAppInsightsTelemetryProvider(); builder.AddCrashDumpProvider(ignoreIfNotSupported: true); -builder.AddTrxReportProvider(); +builder.AddHangDumpProvider(); builder.AddRetryProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/IntegrationTests/TestAssets/Directory.Build.props b/test/IntegrationTests/TestAssets/Directory.Build.props new file mode 100644 index 0000000000..c23e0a6f57 --- /dev/null +++ b/test/IntegrationTests/TestAssets/Directory.Build.props @@ -0,0 +1,9 @@ + + + + + + false + + + diff --git a/test/IntegrationTests/TestAssets/Directory.Build.targets b/test/IntegrationTests/TestAssets/Directory.Build.targets index 99e660df3d..e6ef922cae 100644 --- a/test/IntegrationTests/TestAssets/Directory.Build.targets +++ b/test/IntegrationTests/TestAssets/Directory.Build.targets @@ -11,4 +11,5 @@ + diff --git a/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj b/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj index cc5a99e741..90d94beeaa 100644 --- a/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj +++ b/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj @@ -22,9 +22,6 @@ - - - diff --git a/test/UnitTests/MSTest.Analyzers.UnitTests/Program.cs b/test/UnitTests/MSTest.Analyzers.UnitTests/Program.cs index 92aed8206f..b9a888c8d8 100644 --- a/test/UnitTests/MSTest.Analyzers.UnitTests/Program.cs +++ b/test/UnitTests/MSTest.Analyzers.UnitTests/Program.cs @@ -13,8 +13,10 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddCrashDumpProvider(); +builder.AddAppInsightsTelemetryProvider(); +builder.AddCrashDumpProvider(ignoreIfNotSupported: true); builder.AddHangDumpProvider(); +builder.AddRetryProvider(); builder.AddTrxReportProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/UnitTests/MSTest.Engine.UnitTests/Program.cs b/test/UnitTests/MSTest.Engine.UnitTests/Program.cs index cdb391dc1c..123798c2f3 100644 --- a/test/UnitTests/MSTest.Engine.UnitTests/Program.cs +++ b/test/UnitTests/MSTest.Engine.UnitTests/Program.cs @@ -14,9 +14,6 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddHangDumpProvider(); -builder.AddCrashDumpProvider(ignoreIfNotSupported: true); -builder.AddTrxReportProvider(); builder.AddAppInsightsTelemetryProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/UnitTests/MSTest.SourceGeneration.UnitTests/Program.cs b/test/UnitTests/MSTest.SourceGeneration.UnitTests/Program.cs index cdb391dc1c..123798c2f3 100644 --- a/test/UnitTests/MSTest.SourceGeneration.UnitTests/Program.cs +++ b/test/UnitTests/MSTest.SourceGeneration.UnitTests/Program.cs @@ -14,9 +14,6 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddHangDumpProvider(); -builder.AddCrashDumpProvider(ignoreIfNotSupported: true); -builder.AddTrxReportProvider(); builder.AddAppInsightsTelemetryProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/Program.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/Program.cs index 4b97c8b8e6..fce8d6391f 100644 --- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/Program.cs +++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/Program.cs @@ -14,9 +14,6 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddHangDumpProvider(); -builder.AddCrashDumpProvider(ignoreIfNotSupported: true); -builder.AddTrxReportProvider(); builder.AddAppInsightsTelemetryProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/Program.cs b/test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/Program.cs index ea6f07edb4..1ff5fc2b34 100644 --- a/test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/Program.cs +++ b/test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/Program.cs @@ -20,14 +20,15 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif +Console.WriteLine("NATIVE_AOT disabled"); builder.AddAppInsightsTelemetryProvider(); +builder.AddCrashDumpProvider(ignoreIfNotSupported: true); builder.AddHangDumpProvider(); -Console.WriteLine("NATIVE_AOT disabled"); #else Console.WriteLine("NATIVE_AOT enabled"); #endif -builder.AddCrashDumpProvider(ignoreIfNotSupported: true); +builder.AddRetryProvider(); builder.AddTrxReportProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests/Program.cs b/test/UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests/Program.cs index 9c5f7d5a7f..5617cc50d4 100644 --- a/test/UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests/Program.cs +++ b/test/UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests/Program.cs @@ -12,8 +12,10 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddHangDumpProvider(); +builder.AddAppInsightsTelemetryProvider(); builder.AddCrashDumpProvider(ignoreIfNotSupported: true); +builder.AddHangDumpProvider(); +builder.AddRetryProvider(); builder.AddTrxReportProvider(); builder.AddAzureDevOpsProvider(); diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Program.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Program.cs index 54292c954f..47d8d397df 100644 --- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Program.cs +++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Program.cs @@ -19,8 +19,10 @@ #if ENABLE_CODECOVERAGE builder.AddCodeCoverageProvider(); #endif -builder.AddCrashDumpProvider(); +builder.AddAppInsightsTelemetryProvider(); +builder.AddCrashDumpProvider(ignoreIfNotSupported: true); builder.AddHangDumpProvider(); +builder.AddRetryProvider(); builder.AddTrxReportProvider(); builder.AddAzureDevOpsProvider();