-
Notifications
You must be signed in to change notification settings - Fork 885
Migrate to xUnit v3 #7607
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
Merged
Merged
Migrate to xUnit v3 #7607
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
78dec7d
Migrate test infrastructure from xUnit v2 to xUnit v3
Copilot 3d22738
Fix xUnit v3 migration: IAsyncLifetime ValueTask, type conflicts, mis…
Copilot de66fb7
Fix XunitLoggerProvider v2/v3 ITestOutputHelper type mismatch with ad…
Copilot d3b5748
Remove reference to non-existent test/TestUtilities/TestUtilities.csp…
Copilot a2fa86f
Fix IDE0011, IDE0055, xUnit1006, CA1822 warnings treated as errors in CI
Copilot 314c565
Fix IDE0032 and CA1816 warnings in ProjectTemplates Infrastructure
Copilot 3b44bb1
Fix CS8602 nullable dereference warnings on Record.Exception() results
Copilot e5f259e
Fix NU1010 Windows build errors by adding empty-TF fallback for AspNe…
Copilot fff9efa
Address review feedback: ConditionalNet472 pattern, Assert.SkipUnless…
Copilot 17f28af
Fix S4144: deduplicate FunctionInvocation_RequireSpecific by delegati…
Copilot df4b7c5
Address review feedback: fix UseVSTestRunner conflict, move Condition…
Copilot 77d93e4
Restore xUnit1051 suppression with explanatory comment
Copilot bf1d599
Fix NU1010 by using literal net10.0 instead of $(LatestTargetFramewor…
Copilot 2b96c96
fix the Windows build
adamsitnik fe3a017
Replace OperatingSystem.Is* with RuntimeInformation.IsOSPlatform for …
Copilot 775f646
fix the Windows build
adamsitnik 03c1650
Fix SA1208/SA1210: sort using directives alphabetically with System.*…
Copilot 8a1169e
Fix S1128 (unnecessary using System) and FS0052 (struct copy in F# au…
Copilot 9c40b6f
fix the build one more time ;)
adamsitnik f2a497c
Add TestingPlatformDotnetTestSupport to fix dotnet test
Copilot 30ea7b5
Skip --blame args for Microsoft.Testing.Platform runner (xUnit v3)
Copilot 3c47257
Fix 4 test failures: F# runtime, Verify DisplayClass, OllamaSharp RT0…
Copilot 6161be6
Fix OllamaSharp integration test "zero tests ran" failure with --igno…
Copilot aa3681d
Fix template test xUnit v2/v3 conflicts and ExtendedLoggerTests .NET …
Copilot 1683dd5
Fix template integration tests: deploy xunit v2 DLLs at runtime for V…
Copilot bc9ad28
Switch template tests to Microsoft.TemplateEngine.Authoring.TemplateV…
Copilot f1d06c2
Address review feedback: use ConditionalNet472, fix csproj formatting…
Copilot 9b0eb72
Revert NETFRAMEWORK conditional in ExtendedLoggerTests - AggregateExc…
Copilot d2d3d57
remove unused using
adamsitnik 9bb93af
Revert "Revert NETFRAMEWORK conditional in ExtendedLoggerTests - Aggr…
adamsitnik c9f4252
Merge branch 'main' into copilot/update-to-xunit-30
adamsitnik fb1887e
Apply suggestions from code review
adamsitnik 733864a
Fix template test dotnet host discovery on Linux
Copilot 6e4979f
Revert WellKnownPaths dotnet host fallback change
Copilot ad3e1c0
Address tagged PR feedback on TFM conditions and csproj formatting
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", | ||
| "diagnosticMessages": true, | ||
| "longRunningTestSeconds": 300, | ||
| "shadowCopy": false | ||
| "longRunningTestSeconds": 300 | ||
| } |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,32 @@ | ||
| <Project> | ||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" /> | ||
|
|
||
| <PropertyGroup> | ||
| <XUnitCoreSettingsFile>$(MSBuildThisFileDirectory)\..\eng\xunit.runner.json</XUnitCoreSettingsFile> | ||
| <XUnitDesktopSettingsFile>$(MSBuildThisFileDirectory)\..\eng\xunit.runner.json</XUnitDesktopSettingsFile> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="AutoFixture.AutoMoq" /> | ||
| <PackageReference Include="autofixture" /> | ||
| <PackageReference Include="AwesomeAssertions" /> | ||
| <PackageReference Include="Moq.AutoMock" /> | ||
| <PackageReference Include="Moq" /> | ||
| <PackageReference Include="StrongNamer" Condition="'$(SignArtifacts)' == 'true' " /> | ||
| <PackageReference Include="Verify.Xunit" /> | ||
| <PackageReference Include="Verify.XunitV3" /> | ||
| <PackageReference Include="Xunit.Combinatorial" /> | ||
|
|
||
| <Content Include="$(MSBuildThisFileDirectory)\..\eng\xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Visible="false" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- | ||
| Override $(TargetFrameworks) to contain only the current TFM before Verify's WriteVerifyAttributes | ||
|
adamsitnik marked this conversation as resolved.
|
||
| target runs. When Verify sees multiple TFMs in the Verify.TargetFrameworks assembly metadata, it | ||
| auto-adds a TFM discriminator (e.g. DotNet10_0) to verified file names, but the existing | ||
| .verified.txt files don't have one. Setting a single TFM prevents the discriminator. | ||
| --> | ||
| <Target Name="_OverrideVerifyTargetFrameworks" BeforeTargets="WriteVerifyAttributes"> | ||
| <PropertyGroup> | ||
| <TargetFrameworks>$(TargetFramework)</TargetFrameworks> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| </Project> | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.