-
Notifications
You must be signed in to change notification settings - Fork 171
Update to xUnit v3 on Microsoft Testing Platform v2 #1626
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
Draft
bart-vmware
wants to merge
9
commits into
main
Choose a base branch
from
update-xunit-mtp2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+372
−158
Conversation
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
aa65c8e to
1fccca9
Compare
Contributor
Summary - All Code Coverage (ubuntu-latest)
|
52252c4 to
fa40ecf
Compare
39f0e96 to
bba338e
Compare
|
bba338e to
50e510e
Compare
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.



Description
This PR migrates existing xUnit v3 tests to run on Microsoft Testing Platform v2, instead of VSTest. This enables running tests both via
dotnet testand as direct executables.What's changed
Microsoft.Testing.Extensions.CodeCoverage, because it is incompatiblexunit.runner.visualstudioandMicrosoft.NET.Test.Sdk, which are no longer neededglobal.json, which is required for MTP v2 when using the .NET 10 SDK.runsettingsreplaced bycoverage.config)TestTfmsInParallelnow actually works)UseMicrosoftTestingPlatformRunnerxunit.runner.jsoninstead oftestconfig.json, because it works with multiple runnersdotnet testexists with an error (can be overruled with--minimum-expected-tests 0or catching the related exit code)Verification
dotnet teston the command linedotnet teston the command line✋ It's only possible to debug once; a VS restart is required to debug again (tracked at VS Test Explorer never completes when debugging test in WSL2 microsoft/testfx#7043)
dotnet teston the command line✋ We lost statement branch coverage here
✋ We lost statement branch coverage here
✋ Works, but outputs a 160 MB text log, which makes the GitHub Actions UI completely unresponsive; tracked at Excessive output when crashdump kicks in microsoft/testfx#7045
✋ This doesn't currently work, tracked at [MTP]: Timeout doesn't abort hanging tests microsoft/testfx#6776
dotnet teston the command linedotnet teston the command lineQuality checklist
If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.