Skip to content

deps: Bump MSTest.TestFramework from 2.2.10 to 4.2.1 - #249

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/nuget/MergerLogicUnitTests/master/multi-5ea5c02f9f
Open

deps: Bump MSTest.TestFramework from 2.2.10 to 4.2.1#249
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/nuget/MergerLogicUnitTests/master/multi-5ea5c02f9f

Conversation

@dependabot

@dependabotdependabotBot commented on behalf of githubApr 16, 2026

Copy link
Copy Markdown

Updated MSTest.TestFramework from 2.2.10 to 4.2.1.

Release notes

Sourced from MSTest.TestFramework's releases.

4.2.1

See the release notes here

4.1.0

See the release notes here

4.0.2

See the release notes here

4.0.1

See the release notes here

4.0.0

What is new?

Assert.That

MSTest v4 adds a new type of assertion, that allows you to write any expression, and it will inspect the result to give you more information on failure. Providing a very flexible way to assert complicated expressions. Here a simple example:

[TestClass]publicsealedclassTest1{[TestMethod]publicvoidTestMethod1(){varanimal="Tiger";varzoo=newZoo();Assert.That(()=>zoo.GetAnimal()==animal);}}publicclassZoo{publicstringGetAnimal(){return"Giraffe";}}
Assert.That(() => zoo.GetAnimal() == animal) failed.
Details:
animal = "Tiger" zoo.GetAnimal() = "Giraffe"

CallerArgumentExpression

CallerArgumentExpression is consumed by all assertions, to make them aware of the expressions used in the assertion. In the example below, we now know what both the expected and actual values are. But also what value they come from, giving us opportunity to provide better error messages:

[TestClass]publicsealedclassTest1{[TestMethod]publicvoidTestMethod1(){stringanimal=null;Assert.AreEqual("Giraffe",animal);}}
...(truncated)
## 4.0.0-preview.25372.6Thisisaprerelease of MSTest v4.Docs on migration from v3 to v4 are in progress. We are working towards addressing the items trackedin #​1285 and #​5762
## 4.0.0-preview.25358.7Thisisaprerelease of MSTest v4.Docs on migration from v3 to v4 are in progress. We are working towards addressing the items trackedinhttps://github.com/microsoft/testfx/issues/1285 and https://github.com/microsoft/testfx/issues/5762
## 3.11.1Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.11.1)
## 3.11.0Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.11.0)
## 3.10.5Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.5)
## 3.10.4Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.4)
## 3.10.3Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.3)
## 3.10.2Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.2)
## 3.10.1Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.1)
## 3.10.0Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.0)
## 3.9.3
## What's Changed*Simplerfix for dotnet test when using retry by @​Youssef1313in #​5732.Note that thisPR targets rel/3.9branch.For3.10, we did a different fix: https://github.com/microsoft/testfx/pull/5717
See the MSTest changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.9.3
See the Microsoft.Testing.Platform changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog-Platform.md#​1.7.3**Full Changelog**: https://github.com/microsoft/testfx/compare/v3.9.2...v3.9.3
## 3.9.2
## What's Changed
* Fix MSTEST0042 (duplicatedata row) false positivewithZero/NegativeZero by @​Youssef1313in #​5684*Allow framework authors to use TestCase.FullyQualifiedNameasthe TestNodeUid by @​Youssef1313 in #​5658* Ensure TestMethodAttribute.Execute is run on the correct execution context by @​Youssef1313 in #​5688*Avoid loading System.Threading.Tasks.Extensionswhen not needed by @​Youssef1313 in #​5694*Fix UseAsync property in TestMethodAttribute derived classes to use type checks by @​Youssef1313 and @​Copilot in #​5708*Fix UnitTestRunner leaking some test class instances by @​Youssef1313 in #​5715
See the MSTest changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.9.2
See the Microsoft.Testing.Platform changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog-Platform.md#​1.7.2**Full Changelog**: https://github.com/microsoft/testfx/compare/v3.9.1...v3.9.2
## 3.9.1
## What's Changed
* Make ConditionBaseAttribute.Mode public by @​youssef-backport-botin https://github.com/microsoft/testfx/pull/5597*Add missing overload for Assert.Throws by @​youssef-backport-botin https://github.com/microsoft/testfx/pull/5620*Fix System.MissingMethodException for KeyValuePair Deconstruction by @​youssef-backport-botin https://github.com/microsoft/testfx/pull/5635*Run the whole ExecuteInternal logic under the right execution context by @​youssef-backport-botin https://github.com/microsoft/testfx/pull/5646*VSTestBridge: Handle TestPropertyAttributes.Trait instead of special casing specific properties by @​youssef-backport-botin https://github.com/microsoft/testfx/pull/5648
See the MSTest changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.9.1
See the Microsoft.Testing.Platform changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog-Platform.md#​1.7.1**Full Changelog**: https://github.com/microsoft/testfx/compare/v3.9.0...v3.9.1
## 3.9.0
In this release we focused a lot on providing fixes for MSTest and Microsoft.Testing.Platform. The most notable new features and fixes are:
## MSTest
*Allow async test methods for UITestMethod on UWP and WinUI by @​Youssef1313 in https://github.com/microsoft/testfx/pull/5297*Add analyzer for duplicate data row by @​Youssef1313 in https://github.com/microsoft/testfx/pull/5144*Fix ClassCleanup not called when the first test inclassis ignored by @​Youssef1313 in https://github.com/microsoft/testfx/pull/5070*Fix writing warnings outside of appdomain by @​nohwnd in https://github.com/microsoft/testfx/pull/5371
## Microsoft.Testing.Platform
*Add(alpha) Azure DevOps extension to report errors by @​nohwnd in https://github.com/microsoft/testfx/pull/5260*Kill testhost if writing hang dump fails by @​Youssef1313 in https://github.com/microsoft/testfx/pull/5538
We've also improved the `dotnet test` experience in dotnet SDK, especially around Retry plugin experience, and started dogfooding the experience in our own repository. Please check out how to enable the new `dotnet test` experience for Microsoft.Testing.Platform in net10 by [followingthis link](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test#microsofttestingplatform-mtp-mode-of-dotnet-test), and help us dogfood it.
## NewContributors* @​stan-sz made their first contribution inhttps://github.com/microsoft/testfx/pull/5214* @​YoshiRulz made their first contribution inhttps://github.com/microsoft/testfx/pull/5281* @​bjornhellander made their first contribution inhttps://github.com/microsoft/testfx/pull/5300Seethe MSTest changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.9.0
See the Microsoft.Testing.Platform changelog here: https://github.com/microsoft/testfx/blob/main/docs/Changelog-Platform.md#​1.7.0**Full Changelog**: https://github.com/microsoft/testfx/compare/v3.8.3...v3.9.0
## 3.9.0-preview.25167.10
## 3.8.3
See the release notes[here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.8.3)
## 3.8.2Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.8.2)
## 3.8.1Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.8.1)
## 3.8.0Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.8.0)
## Announcements-This release adds new Assert APIs related to throwing exceptions,collections,andstrings. Refer to the changelog for more information.-This release adds support for generic test methods.- This release adds few newanalyzers.-We added [`MSTestAnalysisMode`](https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/overview#mstestanalysismode). We encourage you to set this property to at least `Recommended`.-This release adds `RetryAttribute`
-[Microsoft.Testing.Extensions.TrxReport](https://www.nuget.org/packages/Microsoft.Testing.Extensions.TrxReport) and [Microsoft.Testing.Extensions.CodeCoverage](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CodeCoverage) are now a dependency of MSTest metapackage
## 3.7.3Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.7.3)
## 3.7.2Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.7.2)
## 3.7.1Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.7.1)
## 3.7.0Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.7.0)
## Announcements[MSTest.Analyzers](https://www.nuget.org/packages/MSTest.Analyzers) is now a transitive dependency of [MSTest.TestFramework](https://www.nuget.org/packages/MSTest.TestFramework) and thus no longer needs to be manually installed.Note: The only rules enabled bydefaultaswarnings,whichcould potentially cause build errors when updating MSTest,havebeen carefully selected and thoroughly validated. These rules specifically address real runtime issues related to the usage of MSTest,ensuringthat no purely stylistic or low-impact analyzers are enforced by default.
## 3.6.4
See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.6.4)
## 3.6.3Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.6.3)
## 3.6.2Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.6.2)
## 3.6.1Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.6.1)
## 3.6.0Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.6.0)Specialshoutout to @​SimonCropp for his exceptional contribution in improving the quality of the repository.
## 3.5.2
See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.5.2)
## 3.5.1Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.5.1)
## 3.5.0Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.5.0)
## 3.4.3Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.4.3)
## 3.4.2Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.4.2)
## 3.4.1Seethe release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.4.1)
## 3.4.0Hereare the highlights of the current release,fullchange log is available below:
https://github.com/microsoft/testfx/compare/v3.3.1...v3.4.0
## MSTest
### New and improved analyzers
We've added more code analyzers to help you prevent mistakes,andto ensure a consistent code style of your tests. One example of a newanalyzer that was added in3.4.0is `MSTEST0024: Do not store TestContextinstaticmembers`.This analyzer has `info` severity by default, and will show a message,when you store `TestContext` inastatic member inyourclass.Thisis not recommended,andyou should be using a `TestContext` property instead:![image](https://github.com/microsoft/testfx/assets/5735905/ab0f95c3-f83e-47b9-a995-87161cb6a61c)Theother analyzers added inthis release:*MSTEST0017: Assertion arguments should be passed in the correct order by @​Evangelink in [#​2256](https://github.com/microsoft/testfx/pull/2256)*MSTEST0019: Prefer TestInitialize over ctor by @​Evangelink in[#​2580](https://github.com/microsoft/testfx/pull/2580)*MSTEST0020: Prefer ctors over TestInitialize methods by @​Evangelink in[#​2582](https://github.com/microsoft/testfx/pull/2582)*MSTEST0021: Prefer Dispose over TestCleanup methods by @​Evangelink in[#​2585](https://github.com/microsoft/testfx/pull/2585)*MSTEST0022: Prefer 'TestCleanup' methods overDispose by @​Evangelink in[#​2586](https://github.com/microsoft/testfx/pull/2586)*MSTEST0023: Do not negate boolean assertionsby @​Evangelink in[#​2594](https://github.com/microsoft/testfx/pull/2594)*MSTEST0024: Do not store TestContext instaticmembers by @​Evangelink in[#​2597](https://github.com/microsoft/testfx/pull/2597)* Add PreferAssertFailOverAlwaysFalseConditionsAnalyzer by @​Youssef1313 in[#​2799](https://github.com/microsoft/testfx/pull/2799)Ifyou've just learned about MSTest analyzers,pleasealso check outthe[analyzersthat were added inpreviousreleases](https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/overview). They will help you ensure that your test classes and test methods are recognized by MSTest and are not accidentally ignored.Theanalyzers are automatically installed with the [MSTest](https://www.nuget.org/packages/MSTest/) NuGet meta-package. But can also be installed separately using the [MSTest.Analyzers](https://www.nuget.org/packages/MSTest.Analyzers/) NuGet package.
### Moretimeout options
Timeout can now be specified on all fixture methods,includingClassCleanup,AssemblyCleanup,TestCleanup and TestInitalize.Inthis case I want my `[ClassCleanup]` totime out after 1second:![image](https://github.com/microsoft/testfx/assets/5735905/517bd606-36f8-4096-9e30-e8b88580f46c)Alternativelytimeouts can be specified through runsettings. For example like this: ```xml
<RunSettings><MSTest><ClassCleanupTimeout>1000</ClassCleanupTimeout></MSTest></RunSettings>

Better errors on data mismatch

When you provide data that don't match your test method signature, the test will fail with an informative message, rather than just "Parameter count mismatch.".

image
... (truncated)

3.3.1

See the release notes here

3.3.0

See the release notes here.

3.2.2

See the release notes here.

3.2.1

See the release notes here.

3.2.0

See the release notes here.

3.2.0-preview.24069.3

See the release notes here.

3.2.0-preview.23623.1

See the release notes here.

3.2.0-preview.23622.1

See the release notes here.

3.1.1

See the release notes here.

3.1.0

See the release notes here.

ARTIFACTS FOR THIS RELEASE WERE CORRUPTED - YOU NEED TO LOOK AT ARTIFACTS OF v3.1.1

3.0.4

See the release notes here.

3.0.3

See the release notes here.

3.0.2

See the release notes here.

3.0.1

See the release notes here.

3.0.0

See the release notes here.

3.0.0-preview-20221122-01

See the release notes here.

3.0.0-preview-20221110-04

See the release notes here.

Breaking changes

See breaking changes announcement

  • Following Microsoft .NET lifecycle
    • Dropped support for .NET Framework 4.5 (moved to 4.6.2)
    • Dropped support for .NET Standard 1.0 (moved to 2.0)
    • Dropped support for UWP before 16299
    • Dropped support for WinUI before 18362
    • Dropped support for .NET 5 (replaced with netcoreapp3.1 and .NET 6)
  • Merge timeout behaviors across all target frameworks
  • Change available constructors for DataRowAttribute
  • Change test ID generation strategy (allow to switch to previous strategies)

2.3.0-preview-20220810-02

See release notes here.

Commits viewable in compare view.

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: MSTest.TestFramework
dependency-version: 4.2.1
dependency-type: direct:production
update-type: version-update:semver-major
- dependency-name: MSTest.TestFramework
dependency-version: 4.2.1
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
@dependabotdependabotBot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Apr 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency file.NETPull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants