From 582bff6ee0ff785163329fa30af2a09d99d5117b Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 22 Jul 2025 19:11:02 +0200 Subject: [PATCH 1/9] Create unit-testing-mstest-migration-from-v3-to-v4.md --- ...-testing-mstest-migration-from-v3-to-v4.md | 199 ++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md new file mode 100644 index 0000000000000..4cf5d23990051 --- /dev/null +++ b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md @@ -0,0 +1,199 @@ +--- +title: MSTest migration from v3 to v4 +description: Learn about migrating to MSTest v4. +author: Youssef1313 +ms.author: ygerges +ms.date: 07/08/2025 +--- + +# Migrate from MSTest v3 to MSTest v4 + +The first preview of MSTest v4 is now available. This migration guide explores what's changed in MSTest v4 and how you can migrate to this version. + +> [!NOTE] +> Generally speaking, MSTest v4 isn't binary compatible with MSTest v3. Any libraries compiled against v3 must be recompiled against v4. + +## Source breaking changes + +These are breaking changes that might cause your test projects to fail to compile. + +### TestMethodAttribute breaking changes + +#### Change TestMethodAttribute.Execute to TestMethodAttribute.ExecuteAsync + +If you implement your own `TestMethodAttribute`, you need to change the `Execute` override to be `ExecuteAsync`. +This change was made to fix long-standing deadlock bugs that are caused by the synchronous blocking nature of the API. + +For example, if you previously had the following: + +```csharp +public sealed class MyTestMethodAttribute : TestMethodAttribute +{ + public override TestResult[] Execute(ITestMethod testMethod) + { + // ... + return result; + } +} +``` + +You will need to change it to the following: + +```csharp +public sealed class MyTestMethodAttribute : TestMethodAttribute +{ + public override Task ExecuteAsync(ITestMethod testMethod) + { + // ... + return Task.FromResult(result); + } +} +``` + +#### TestMethodAttribute now uses caller info attributes + +The `TestMethodAttribute` constructor has changed to have parameters that provide caller info attributes. + +- If you inherit from `TestMethodAttribute`, you should also provide such a constructor that propagates the information to the base class. + + ```csharp + public class MyTestMethodAttribute : TestMethodAttribute + { + public MyTestMethodAttribute([CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1) + : base(callerFilePath, callerLineNumber) + { + } + } + ``` + +- If you have attribute applications such as `[TestMethodAttribute("Custom display name")]`, switch them to `[TestMethodAttribute(DisplayName = "Custom display name")]`. + +> [!TIP] +> An analyzer with a codefix is forthcoming to help you with this migration. A single click in the IDE will fix all instances in your solution. + + +### ClassCleanupBehavior enum is removed + +Now, the ClassCleanup methods run only at the end of the test class. Support for class cleanup to run at the end of assembly is removed. +If you must run end of assembly cleanup logic, do it in `AssemblyCleanup` rather than `ClassCleanup`. +The default behavior of class cleanup was previously "EndOfAssembly", which users considered to be a bug. + +If you previously had the following code: + +```csharp +[ClassCleanup(ClassCleanupBehavior.EndOfClass)] +public static void ClassCleanup(TestContext testContext) +{ +} +``` + +You will need to change it to the following: + +```csharp +[ClassCleanup] +public static void ClassCleanup(TestContext testContext) +{ +} +``` + +### TestContext.Properties is now IDictionary + +Previously, `TestContext.Properties` was an `IDictionary`. To provide better typing, it's now `IDictionary`. + +If you have calls to `TestContext.Properties.Contains`, update them to `TestContext.Properties.ContainsKey`. + +### TestTimeout enum is removed + +This enum only had a single member, `Infinite`, whose value was `int.MaxValue`. +If you had usages of `[Timeout(TestTimeout.Infinite)]`, update them to `[Timeout(int.MaxValue)]`. + +### Types not intended for public consumption are made internal or removed + +- `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` is made internal. + - Note that this interface is different from ITestMethod in TestFramework assembly, which didn't change. + - `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` doesn't have any valid usages for users, so it was made internal. +- Some of the already-obsolete types are made internal. This includes: + - MSTestDiscoverer + - MSTestExecutor + - AssemblyResolver + - LogMessageListener + - TestExecutionManager + - TestMethodInfo + - TestResultExtensions + - UnitTestOutcomeExtensions + - GenericParameterHelper + - Types in platform services assembly + +### Assert APIs signature change + +- Assert APIs that accept both `message` and `object[]` parameters now accept only `message`. Use string interpolation instead. This was a necessary change to support caller argument expression for assertion APIs. +- `Assert.AreEqual` APIs for `IEquatable` are removed. There are very few users of this API, and the API is misleading. Most users aren't affected by this removal, as the API didn't initially exist in MSTest v3 and was introduced in 3.2.2. + - This API causes issues for F# users as well. For example, see [fsharp/fslang-suggestions/issues/905](https://github.com/fsharp/fslang-suggestions/issues/905#issuecomment-2336831360). + - If you're affected, you'll get a compile error about generic type inference. All you need to do is explicitly specify the type argument as `object`. +- The deprecated `Assert.ThrowsException` APIs are removed. An analyzer and codefix in MSTest 3.10 help migrate you to the newer APIs. +- Usages of `Assert.IsInstanceOfType(x, out var t)` should now change to `var t = Assert.IsInstanceOfType(x)`. + - Existing overloads that didn't have the `out` parameter changed to return the instance of type `T` instead of void. This is only a breaking change for F#. + +### ExpectedExceptionAttribute API is removed + +The deprecated `ExpectedExceptionAttribute` API is removed. An analyzer (MSTEST0006) and codefix in MSTest 3.2 help migrate you to `Assert.Throws`. + +For example, if you had the following code: + +```csharp +[ExpectedException(typeof(SomeExceptionType))] +[TestMethod] +public void TestMethod() +{ + MyCall(); +} +``` + +You (or the analyzer and codefix) need to change it to the following: + +```csharp +[TestMethod] +public void TestMethod() +{ + Assert.ThrowsExactly(() => MyCall()); +} +``` + +### Dropped unsupported target frameworks + +Support for target frameworks .NET Core 3.1 to .NET 7.0 is dropped. The minimum supported .NET version is .NET 8.0. +This change doesn't affect .NET Framework. .NET Framework 4.6.2 continues to be the minimum supported .NET Framework target. + +### Unfolding strategy moved from individual data sources to TestMethodAttribute + +Unfolding strategy is a recent feature introduced in MSTest 3.7 to work around known limitations. +The property was added on individual data sources like `DataRowAttribute` and `DynamicDataAttribute`. This property has been moved to `TestMethodAttribute`. + +### `ConditionBaseAttribute.ShouldRun` API change + +We renamed `ConditionBaseAttribute.ShouldRun` property to `IsConditionMet`. That makes it more clear that `ConditionMode` shouldn't be used in the implementation. + +## Behavior breaking changes + +These are breaking changes that might affect the behavior at run time. + +### DisableAppDomain now defaults to true when running under Microsoft.Testing.Platform + +In v4, and when running with Microsoft.Testing.Platform, AppDomains are disabled by default (when not specified) as the custom isolation provided is useless in most of the cases and has an important impact on performances (up to 30% slower when running under isolation). + +However, the feature remains available. If you have scenarios requiring it, add the `DisableAppDomain` setting in runsettings. + +### TestContext throws when used incorrectly + +The `TestContext` type is passed to AssemblyInitialize, ClassInitialize, and to tests, but available information at each stage is different. Now, an exception is thrown when accessing a property related to a test run information as part of `AssemblyInitialize` or `ClassInitialize`. + +- `TestContext.FullyQualifiedTestClassName` cannot be accessed in assembly initialize. +- `TestContext.TestName` cannot be accessed in assembly initialize or class initialize. + +### TestCase.Id is changing + +To address long outstanding bugs that many users filed, the generation of `TestCase.Id` has changed. This affects Azure DevOps features, for example, tracking test failures over time. + +### TreatDiscoveryWarningsAsErrors now defaults to true + +v4 uses stricter defaults. As such, the default value of `TreatDiscoveryWarningsAsErrors` is now `true`. This should be a transparent change for most users and should help other users to uncover hidden bugs. From 12e3188f61695fcdc9abe6b912b21d3527df02fe Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 22 Jul 2025 19:11:33 +0200 Subject: [PATCH 2/9] Update unit-testing-mstest-migration-from-v3-to-v4.md --- .../core/testing/unit-testing-mstest-migration-from-v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md index 4cf5d23990051..b3ffdaf1e68e2 100644 --- a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md +++ b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md @@ -8,7 +8,7 @@ ms.date: 07/08/2025 # Migrate from MSTest v3 to MSTest v4 -The first preview of MSTest v4 is now available. This migration guide explores what's changed in MSTest v4 and how you can migrate to this version. +The preview versions MSTest v4 are now available. This migration guide explores what's changed in MSTest v4 and how you can migrate to this version. > [!NOTE] > Generally speaking, MSTest v4 isn't binary compatible with MSTest v3. Any libraries compiled against v3 must be recompiled against v4. From 474b04597bca4f9052c4fa844413319ffab260a6 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 22 Jul 2025 19:11:44 +0200 Subject: [PATCH 3/9] Update unit-testing-mstest-migration-from-v3-to-v4.md --- .../core/testing/unit-testing-mstest-migration-from-v3-to-v4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md index b3ffdaf1e68e2..9af5eccff41f6 100644 --- a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md +++ b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md @@ -3,7 +3,7 @@ title: MSTest migration from v3 to v4 description: Learn about migrating to MSTest v4. author: Youssef1313 ms.author: ygerges -ms.date: 07/08/2025 +ms.date: 07/22/2025 --- # Migrate from MSTest v3 to MSTest v4 From e35cc762ddcda609c85892697e49ebdc841f2de0 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 22 Jul 2025 19:18:20 +0200 Subject: [PATCH 4/9] Update unit-testing-mstest-migration-from-v3-to-v4.md --- ...-testing-mstest-migration-from-v3-to-v4.md | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md index 9af5eccff41f6..7316da1d349f4 100644 --- a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md +++ b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md @@ -30,10 +30,10 @@ For example, if you previously had the following: public sealed class MyTestMethodAttribute : TestMethodAttribute { public override TestResult[] Execute(ITestMethod testMethod) - { - // ... - return result; - } + { + // ... + return result; + } } ``` @@ -43,10 +43,10 @@ You will need to change it to the following: public sealed class MyTestMethodAttribute : TestMethodAttribute { public override Task ExecuteAsync(ITestMethod testMethod) - { - // ... - return Task.FromResult(result); - } + { + // ... + return Task.FromResult(result); + } } ``` @@ -57,14 +57,14 @@ The `TestMethodAttribute` constructor has changed to have parameters that provid - If you inherit from `TestMethodAttribute`, you should also provide such a constructor that propagates the information to the base class. ```csharp - public class MyTestMethodAttribute : TestMethodAttribute - { - public MyTestMethodAttribute([CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1) + public class MyTestMethodAttribute : TestMethodAttribute + { + public MyTestMethodAttribute([CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1) : base(callerFilePath, callerLineNumber) - { - } - } - ``` + { + } + } + ``` - If you have attribute applications such as `[TestMethodAttribute("Custom display name")]`, switch them to `[TestMethodAttribute(DisplayName = "Custom display name")]`. @@ -111,25 +111,25 @@ If you had usages of `[Timeout(TestTimeout.Infinite)]`, update them to `[Timeout - `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` is made internal. - Note that this interface is different from ITestMethod in TestFramework assembly, which didn't change. - - `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` doesn't have any valid usages for users, so it was made internal. + - `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` doesn't have any valid usages for users, so it was made internal. - Some of the already-obsolete types are made internal. This includes: - MSTestDiscoverer - - MSTestExecutor - - AssemblyResolver - - LogMessageListener - - TestExecutionManager - - TestMethodInfo - - TestResultExtensions - - UnitTestOutcomeExtensions - - GenericParameterHelper - - Types in platform services assembly + - MSTestExecutor + - AssemblyResolver + - LogMessageListener + - TestExecutionManager + - TestMethodInfo + - TestResultExtensions + - UnitTestOutcomeExtensions + - GenericParameterHelper + - Types in platform services assembly ### Assert APIs signature change - Assert APIs that accept both `message` and `object[]` parameters now accept only `message`. Use string interpolation instead. This was a necessary change to support caller argument expression for assertion APIs. - `Assert.AreEqual` APIs for `IEquatable` are removed. There are very few users of this API, and the API is misleading. Most users aren't affected by this removal, as the API didn't initially exist in MSTest v3 and was introduced in 3.2.2. - This API causes issues for F# users as well. For example, see [fsharp/fslang-suggestions/issues/905](https://github.com/fsharp/fslang-suggestions/issues/905#issuecomment-2336831360). - - If you're affected, you'll get a compile error about generic type inference. All you need to do is explicitly specify the type argument as `object`. + - If you're affected, you'll get a compile error about generic type inference. All you need to do is explicitly specify the type argument as `object`. - The deprecated `Assert.ThrowsException` APIs are removed. An analyzer and codefix in MSTest 3.10 help migrate you to the newer APIs. - Usages of `Assert.IsInstanceOfType(x, out var t)` should now change to `var t = Assert.IsInstanceOfType(x)`. - Existing overloads that didn't have the `out` parameter changed to return the instance of type `T` instead of void. This is only a breaking change for F#. @@ -145,7 +145,7 @@ For example, if you had the following code: [TestMethod] public void TestMethod() { - MyCall(); + MyCall(); } ``` @@ -155,7 +155,7 @@ You (or the analyzer and codefix) need to change it to the following: [TestMethod] public void TestMethod() { - Assert.ThrowsExactly(() => MyCall()); + Assert.ThrowsExactly(() => MyCall()); } ``` From 7bd31d547c430cc331c58e4246d0d9edea3b82a4 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 23 Jul 2025 11:54:23 +0200 Subject: [PATCH 5/9] Update unit-testing-mstest-migration-from-v3-to-v4.md --- ...-testing-mstest-migration-from-v3-to-v4.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md index 7316da1d349f4..be6e529f7868e 100644 --- a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md +++ b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md @@ -110,29 +110,29 @@ If you had usages of `[Timeout(TestTimeout.Infinite)]`, update them to `[Timeout ### Types not intended for public consumption are made internal or removed - `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` is made internal. - - Note that this interface is different from ITestMethod in TestFramework assembly, which didn't change. - - `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` doesn't have any valid usages for users, so it was made internal. + - Note that this interface is different from ITestMethod in TestFramework assembly, which didn't change. + - `Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ObjectModel.ITestMethod` doesn't have any valid usages for users, so it was made internal. - Some of the already-obsolete types are made internal. This includes: - - MSTestDiscoverer - - MSTestExecutor - - AssemblyResolver - - LogMessageListener - - TestExecutionManager - - TestMethodInfo - - TestResultExtensions - - UnitTestOutcomeExtensions - - GenericParameterHelper - - Types in platform services assembly + - MSTestDiscoverer + - MSTestExecutor + - AssemblyResolver + - LogMessageListener + - TestExecutionManager + - TestMethodInfo + - TestResultExtensions + - UnitTestOutcomeExtensions + - GenericParameterHelper + - Types in platform services assembly ### Assert APIs signature change - Assert APIs that accept both `message` and `object[]` parameters now accept only `message`. Use string interpolation instead. This was a necessary change to support caller argument expression for assertion APIs. - `Assert.AreEqual` APIs for `IEquatable` are removed. There are very few users of this API, and the API is misleading. Most users aren't affected by this removal, as the API didn't initially exist in MSTest v3 and was introduced in 3.2.2. - - This API causes issues for F# users as well. For example, see [fsharp/fslang-suggestions/issues/905](https://github.com/fsharp/fslang-suggestions/issues/905#issuecomment-2336831360). - - If you're affected, you'll get a compile error about generic type inference. All you need to do is explicitly specify the type argument as `object`. + - This API causes issues for F# users as well. For example, see [fsharp/fslang-suggestions/issues/905](https://github.com/fsharp/fslang-suggestions/issues/905#issuecomment-2336831360). + - If you're affected, you'll get a compile error about generic type inference. All you need to do is explicitly specify the type argument as `object`. - The deprecated `Assert.ThrowsException` APIs are removed. An analyzer and codefix in MSTest 3.10 help migrate you to the newer APIs. - Usages of `Assert.IsInstanceOfType(x, out var t)` should now change to `var t = Assert.IsInstanceOfType(x)`. - - Existing overloads that didn't have the `out` parameter changed to return the instance of type `T` instead of void. This is only a breaking change for F#. + - Existing overloads that didn't have the `out` parameter changed to return the instance of type `T` instead of void. This is only a breaking change for F#. ### ExpectedExceptionAttribute API is removed From c25e24c7530d653eed11d5186cb9ec43791398a8 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 23 Jul 2025 21:30:47 +0200 Subject: [PATCH 6/9] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Amaury Levé --- .../testing/unit-testing-mstest-migration-from-v3-to-v4.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md index be6e529f7868e..c528593608dd3 100644 --- a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md +++ b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md @@ -11,7 +11,7 @@ ms.date: 07/22/2025 The preview versions MSTest v4 are now available. This migration guide explores what's changed in MSTest v4 and how you can migrate to this version. > [!NOTE] -> Generally speaking, MSTest v4 isn't binary compatible with MSTest v3. Any libraries compiled against v3 must be recompiled against v4. +> Generally speaking, MSTest v4 isn't binary compatible with MSTest v3. Any library compiled against v3 must be recompiled against v4. ## Source breaking changes @@ -71,7 +71,6 @@ The `TestMethodAttribute` constructor has changed to have parameters that provid > [!TIP] > An analyzer with a codefix is forthcoming to help you with this migration. A single click in the IDE will fix all instances in your solution. - ### ClassCleanupBehavior enum is removed Now, the ClassCleanup methods run only at the end of the test class. Support for class cleanup to run at the end of assembly is removed. @@ -188,7 +187,7 @@ However, the feature remains available. If you have scenarios requiring it, add The `TestContext` type is passed to AssemblyInitialize, ClassInitialize, and to tests, but available information at each stage is different. Now, an exception is thrown when accessing a property related to a test run information as part of `AssemblyInitialize` or `ClassInitialize`. - `TestContext.FullyQualifiedTestClassName` cannot be accessed in assembly initialize. -- `TestContext.TestName` cannot be accessed in assembly initialize or class initialize. +- `TestContext.TestName` cannot be accessed in assembly initialize or class initialize. ### TestCase.Id is changing From 4bd1e3665a218a52f7cfa81758b15f3ef01ec093 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 23 Jul 2025 21:39:25 +0200 Subject: [PATCH 7/9] Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- .../testing/unit-testing-mstest-migration-from-v3-to-v4.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md index c528593608dd3..3ad4f96c01bc8 100644 --- a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md +++ b/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md @@ -8,7 +8,7 @@ ms.date: 07/22/2025 # Migrate from MSTest v3 to MSTest v4 -The preview versions MSTest v4 are now available. This migration guide explores what's changed in MSTest v4 and how you can migrate to this version. +The preview version MSTest v4 is now available. This migration guide explores what's changed in MSTest v4 and how you can migrate to this version. > [!NOTE] > Generally speaking, MSTest v4 isn't binary compatible with MSTest v3. Any library compiled against v3 must be recompiled against v4. @@ -160,7 +160,7 @@ public void TestMethod() ### Dropped unsupported target frameworks -Support for target frameworks .NET Core 3.1 to .NET 7.0 is dropped. The minimum supported .NET version is .NET 8.0. +Support for target frameworks .NET Core 3.1 to .NET 7 is dropped. The minimum supported .NET version is .NET 8. This change doesn't affect .NET Framework. .NET Framework 4.6.2 continues to be the minimum supported .NET Framework target. ### Unfolding strategy moved from individual data sources to TestMethodAttribute @@ -170,7 +170,7 @@ The property was added on individual data sources like `DataRowAttribute` and `D ### `ConditionBaseAttribute.ShouldRun` API change -We renamed `ConditionBaseAttribute.ShouldRun` property to `IsConditionMet`. That makes it more clear that `ConditionMode` shouldn't be used in the implementation. +The `ConditionBaseAttribute.ShouldRun` property was renamed to `IsConditionMet`. That makes it clearer that `ConditionMode` shouldn't be used in the implementation. ## Behavior breaking changes From f80e0abf70023144c565c6e140f587f1f4c25004 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 23 Jul 2025 21:40:21 +0200 Subject: [PATCH 8/9] Rename unit-testing-mstest-migration-from-v3-to-v4.md to unit-testing-mstest-migration-v3-v4.md --- ...on-from-v3-to-v4.md => unit-testing-mstest-migration-v3-v4.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/core/testing/{unit-testing-mstest-migration-from-v3-to-v4.md => unit-testing-mstest-migration-v3-v4.md} (100%) diff --git a/docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md b/docs/core/testing/unit-testing-mstest-migration-v3-v4.md similarity index 100% rename from docs/core/testing/unit-testing-mstest-migration-from-v3-to-v4.md rename to docs/core/testing/unit-testing-mstest-migration-v3-v4.md From 5aa03490e77958b2077ebc41d745de89a62de9b6 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 23 Jul 2025 21:47:36 +0200 Subject: [PATCH 9/9] Update toc.yml --- docs/navigate/devops-testing/toc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/navigate/devops-testing/toc.yml b/docs/navigate/devops-testing/toc.yml index a2b48a204ac31..209006e016882 100644 --- a/docs/navigate/devops-testing/toc.yml +++ b/docs/navigate/devops-testing/toc.yml @@ -73,6 +73,8 @@ items: href: ../../core/testing/unit-testing-mstest-intro.md - name: Migrate MSTest from v1 to v3 href: ../../core/testing/unit-testing-mstest-migration-from-v1-to-v3.md + - name: Migrate from MSTest v3 to MSTest v4 + href: ../../core/testing/unit-testing-mstest-migration-v3-v4.md - name: Microsoft.Testing.Platform support (MSTest runner) href: ../../core/testing/unit-testing-mstest-runner-intro.md - name: Getting started