xUnit v3 upgrade - #960
Merged
Merged
Conversation
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
…ET 10 Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
… but the MassTransit.ActiveMQ package isn't updated yet Tracked: MassTransit/MassTransit#6133
…ss ambiguous referencing
I feel dirty doing that...
Youssef1313
reviewed
Nov 16, 2025
| - name: Run tests | ||
| run: >- | ||
| dotnet test ${{ github.workspace }}/${{ env.TEST_PROJECT_PATH }} | ||
| dotnet run ${{ github.workspace }}/${{ env.TEST_PROJECT_PATH }} |
There was a problem hiding this comment.
You need to:
- Remove
--logger "console;verbosity=normal". - Replace
--logger trxwith--report-trx(and ensure Microsoft.Testing.Extensions.TrxReport is referenced) - Replace all the blame-related args with
--crashdump,--hangdump, and--hangdump-timeout 7m --results-directoryis changing the meaning a little bit with this PR. Previously it would be relative to current working directory${{ github.workspace }}while with this PR it will be relative to the test executable. So either pass the full path, or keep usingdotnet testwhich will handle the path transformation for you.--collect "XPlat Code Coverage"needs to be replaced with--coverage(and ensure Microsoft.Testing.Extensions.CodeCoverage is referenced)
Youssef1313
reviewed
Nov 16, 2025
| --report-trx | ||
| --report-trx-filename "${{ matrix.name }}-${{ matrix.os }}.trx" | ||
| --ignore-exit-code 8 | ||
| -- RunConfiguration.CollectSourceInformation=true |
Youssef1313
reviewed
Nov 16, 2025
| <PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" /> | ||
| <PackageVersion Include="xunit.extensibility.execution" Version="2.9.3" /> | ||
| <PackageVersion Include="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24568.1" /> | ||
| <PackageVersion Include="xunit.v3" Version="3.2.0" /> |
There was a problem hiding this comment.
nit: there is now xunit.v3.mtp-v2 package.
Youssef1313
reviewed
Nov 16, 2025
| <PackageVersion Include="xunit.v3" Version="3.2.0" /> | ||
| <PackageVersion Include="xunit.v3.assert" Version="3.2.0" /> | ||
| <PackageVersion Include="xunit.v3.extensibility.core" Version="3.2.0" /> | ||
| <PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" /> |
There was a problem hiding this comment.
nit: no longer needed if you don't care about VSTest support.
There was a problem hiding this comment.
Suggested change
| <PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" /> |
Youssef1313
reviewed
Nov 16, 2025
| <RunConfiguration> | ||
| <!-- Filter out failing (wrong framework, platform, runtime or activeissue) tests --> | ||
| <TestCaseFilter>category!=unsupported-platform</TestCaseFilter> | ||
| <TestCaseFilter>category!=failing</TestCaseFilter> |
There was a problem hiding this comment.
runsettings isn't supported with MTP.
Youssef1313
reviewed
Nov 16, 2025
| https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-exit-codes --> | ||
| <TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --ignore-exit-code 8</TestRunnerAdditionalArguments> | ||
|
|
||
| <!-- <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner> --> |
Youssef1313
reviewed
Nov 16, 2025
Youssef1313
left a comment
There was a problem hiding this comment.
You need to also update global.json to specify the test runner as MTP, and probably ensure it requires .NET 10.
This was referenced May 15, 2026
Merged
This was referenced May 25, 2026
deps: Bump the all-dependencies group with 27 updates
ministryofjustice/CFO-DataManagementSystem#104
Closed
Closed
deps: Bump the all-dependencies group with 29 updates
ministryofjustice/CFO-DataManagementSystem#106
Closed
Closed
This was referenced Jun 9, 2026
Closed
This was referenced Jul 17, 2026
This was referenced Jul 28, 2026
This was referenced Aug 13, 2026
deps: Bump the all-dependencies group with 40 updates
ministryofjustice/CFO-DataManagementSystem#126
Closed
This was referenced Aug 25, 2026
deps: Bump the all-dependencies group with 41 updates
ministryofjustice/CFO-DataManagementSystem#128
Closed
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.
Upgrading the tests to use xUnit v3, which is what is used by aspire now too.
Close #961