Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 3, 2025

Updated MSTest.TestFramework from 3.9.3 to 4.0.1.

Release notes

Sourced from MSTest.TestFramework's releases.

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]
public sealed class Test1
{
    [TestMethod]
    public void TestMethod1()
    {
        var animal = "Tiger";
        var zoo = new Zoo();
        Assert.That(() => zoo.GetAnimal() == animal);
    }
}

public class Zoo
{
    public string GetAnimal()
    {
        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]
public sealed class Test1
{
    [TestMethod]
    public void TestMethod1()
    {
        string animal = null;
        Assert.AreEqual("Giraffe", animal);
    }
}
 ... (truncated)

## 4.0.0-preview.25372.6

This is a prerelease of MSTest v4. Docs on migration from v3 to v4 are in progress. We are working towards addressing the items tracked in #​1285 and #​5762

## 4.0.0-preview.25358.7

This is a prerelease of MSTest v4. Docs on migration from v3 to v4 are in progress. We are working towards addressing the items tracked in https://github.com/microsoft/testfx/issues/1285 and https://github.com/microsoft/testfx/issues/5762

## 3.11.0

See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.11.0)

## 3.10.5

See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.5)


## 3.10.4

See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.4)


## 3.10.3

See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.3)


## 3.10.2

See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.2)


## 3.10.1

See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.1)


## 3.10.0

See the release notes [here](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#​3.10.0)


Commits viewable in [compare view](https://github.com/microsoft/testfx/compare/v3.9.3...v4.0.1).
</details>

Updated [Verify.MSTest](https://github.com/VerifyTests/Verify) from 30.5.0 to 31.4.1.

<details>
<summary>Release notes</summary>

_Sourced from [Verify.MSTest's releases](https://github.com/VerifyTests/Verify/releases)._

No release notes found for this version range.

Commits viewable in [compare view](https://github.com/VerifyTests/Verify/commits).
</details>

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-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@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)


</details>

Bumps MSTest.TestFramework from 3.9.3 to 4.0.1
Bumps Verify.MSTest from 30.5.0 to 31.4.1

---
updated-dependencies:
- dependency-name: MSTest.TestFramework
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Verify.MSTest
  dependency-version: 31.4.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Nov 3, 2025
@ewoutkramer
Copy link
Member

@copilot - can you take a look what is going wrong here? There are tons of compilation errors.

Copy link
Contributor

Copilot AI commented Nov 4, 2025

@ewoutkramer I've opened a new pull request, #3344, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 16 commits November 4, 2025 10:01
Reverted commits 44d600e, de1e03c, and 601d9a0 that introduced
compilation errors from over-aggressive automated conversions.

Keeping safe fixes up to commit 1c04111:
- 770 MSTEST0037 errors fixed (Assert.HasCount conversions)
- All MSTest 4.0 breaking changes fixed
- No compilation errors

Remaining work:
- 608 MSTEST0037 analyzer warnings
- 322 MSTEST0017 analyzer warnings
These require careful semantic analysis.
Reverted commits 1c04111, 44d600e, de1e03c, and 601d9a0 which introduced
compilation errors due to incorrect Assert.HasCount parameter order and
over-aggressive type conversions.

Clean state at commit ed0a7de:
- All MSTest 4.0 breaking API changes fixed
- 180 simple analyzer warnings fixed (MSTEST0001, 0044, 0052, 0023, 0025, 0055)
- Zero compilation errors
- Solution builds successfully

Remaining analyzer warnings (not blocking compilation):
- 1,378 MSTEST0037: Suggest using specific Assert methods
- 322 MSTEST0017: Suggest swapping expected/actual parameters

These can be addressed carefully in follow-up work.
Checked out all source files from commit ed0a7de to remove
problematic automated conversions that introduced compilation errors.

This undoes the changes from commits:
- 1c04111 (HasCount conversions with wrong parameter order)
- 44d600e (bool/null conversions)
- de1e03c (string assertion conversions)
- 601d9a0 (HasCount parameter order fix attempt)

Result: Zero compilation errors, solution builds successfully.
Fix MSTest 4.0 breaking changes in test suite
@ewoutkramer ewoutkramer enabled auto-merge November 5, 2025 16:49
@ewoutkramer ewoutkramer merged commit 15fb448 into develop Nov 5, 2025
17 checks passed
@ewoutkramer ewoutkramer deleted the dependabot/nuget/src/multi-ddc29dd156 branch November 5, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants