-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update to xunit.v3 #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 our terms of service and privacy 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?
Update to xunit.v3 #26461
Conversation
|
@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.
Co-authored-by: Copilot <[email protected]>
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.
|
@Youssef1313 Please resolve merge conflicts. |
|
@Youssef1313 @iSazonov as a maintainer you may want to add text similar to the above to your own |
PR Summary
This PR updates from xunit 2 to xunit.v3.
Xunit 2 is no longer maintained and repos should move forward to xunit.v3.
PR Context
As mentioned in PR summary, this updates the repo to use xunit.v3 which is the maintained version of xunit.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header