- Notifications
You must be signed in to change notification settings - Fork8.1k
Update to xunit.v3, .NET 10 stable, and MTP#26461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
Youssef1313 commentedDec 5, 2025
@iSazonov Can you run the GitHub workflows here please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR updates the PowerShell test infrastructure from xUnit v2 to xUnit v3, updates to .NET 10 stable SDK, and migrates to the Microsoft Testing Platform (MTP). The changes modernize the testing framework by replacing deprecated xUnit v2 patterns with v3 equivalents and simplifying test execution.
Key changes:
- Migrates from xUnit v2 (version 2.x packages) to xUnit v3 using the
xunit.v3.mtp-v2unified package - Updates test attributes from
SkippableFact/SkippableTheoryto standardFact/TheorywithAssert.Skip*methods - Replaces priority-based test ordering with source declaration ordering
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/xUnit/xUnit.tests.csproj | Consolidates multiple xUnit v2 packages into single xunit.v3.mtp-v2 package, adds OutputType, removes deprecated properties |
| test/hosting/hosting.tests.csproj | Similar xUnit v3 migration with package consolidation |
| global.json | Adds test runner configuration for Microsoft Testing Platform |
| test/xUnit/csharp/test_*.cs | Migrates test attributes and skip conditions to xUnit v3 API (SkippableFact → Fact with Assert.Skip*) |
| test/xUnit/Asserts/PriorityOrderer.cs | Replaces priority-based ordering with source declaration ordering for xUnit v3 |
| test/xUnit/Asserts/PriorityAttribute.cs | Removes deprecated priority attribute no longer needed in v3 |
| build.psm1 | Updates Start-PSxUnit to use MTP command-line arguments instead of legacy dotnet test logger |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
| Assert.SkipUnless(Platform.IsWindows,"Only supported on Windows"); | ||
CopilotAIDec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The firstAssert.Skip call makes all subsequent assertions unreachable. Since this test is meant to be permanently skipped ("Skip this flaky test for now"), the Windows platform check on line 110 will never execute. Consider removing line 110 or restructuring the skip logic if the test should eventually be enabled only on Windows.
| Assert.SkipUnless(Platform.IsWindows, "Only supported on Windows"); |
| $Filter | ||
| ) | ||
| } | ||
CopilotAIDec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The new Microsoft Testing Platform command uses--no-progress flag. Consider documenting the new command-line options (--report-xunit, --report-xunit-filename, --results-directory, --no-progress) in a comment to help maintainers understand the change from the previous dotnet test logger approach to MTP-specific options.
| # The following dotnet test invocation uses new Microsoft Testing Platform (MTP) command-line options: | |
| # --report-xunit: Generates xUnit test results (replaces previous logger approach) | |
| # --report-xunit-filename: Specifies the output file for xUnit results | |
| # --results-directory: Sets the directory for test results | |
| # --no-progress: Disables progress output for cleaner logs | |
| # These options replace the previous dotnet test logger invocation and are required for MTP compatibility. |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days. |
PR Summary
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header