Migrate tests to xUnit 4 and MTP retry - #487
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Jb Evain (jbevain)
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the analyzer test project to xUnit.net v3 4.0.0 and Microsoft.Testing.Platform (MTP) v2, and replace the legacy VSTest CI path with native MTP execution and retry support.
This change:
xunit.v3andxunit.runner.visualstudioto 4.0.0Microsoft.Testing.Extensions.Retry2.3.3UseMicrosoftTestingPlatformRunnerdotnet testConsistencyTestsThis also unblocks the corresponding xUnit 4 migrations in VSTU and VSTUC, which consume this repository through the
external\VSTUAnalyzerssubmodule.CI behavior
The main branch runs the complete suite:
Feature and pull-request branches exclude the documentation-dependent consistency tests:
The generated xUnit 4 runner help was used to confirm the retry and exact-class filter syntax rather than relying on the previous VSTest filter format.
Validation
Validation was performed with .NET SDK 10.0.400:
--helpoutput that--retry-failed-testsand--filter-not-classare available--infooutput that Microsoft.Testing.Platform 2.3.3, the xUnit 4.0.0 provider, and Retry 2.3.3 are active