Skip to content

build: move the tests to xunit 4 - #10

Merged
crazeydave merged 1 commit into
mainfrom
build/xunit-4
Oct 19, 2026
Merged

crazeydave merged 1 commit into
mainfrom
build/xunit-4

Conversation

@crazeydave

Copy link
Copy Markdown
Contributor

Moves Tests and Specs to xunit.v3 4.0.2 and xunit.runner.visualstudio 4.0.1, the same migration as bleedingdeacons/register#70.

  • global.json now sets "test": { "runner": "Microsoft.Testing.Platform" }, and both projects drop TestingPlatformDotnetTestSupport. MTP 2, which xunit 4 brings, no longer runs under dotnet test's VSTest mode on the .NET 10 SDK.
  • Parallelism.cs now uses Parallelization(Mode = ParallelMode.Collections). CollectionBehavior.DisableTestParallelization is a compile error in 4.x, which is what failed Dependabot's chore(deps): Bump the dependencies group with 4 updates #8. The specs still run in parallel.
  • CI and the README are unchanged. They run the test executables directly, which works the same under MTP 2.

Verified locally:

  • Tests: 86/86 passed.
  • Specs: 36 passed, 6 skipped.
  • Both counts match main on xunit 3.2.2.
  • dotnet test --project works, and dotnet format --verify-no-changes is clean.

#8's xunit bump is covered here; its other updates are untouched.

xunit.v3 4.0.2 brings Microsoft.Testing.Platform 2, which no longer runs
under dotnet test's VSTest mode on the .NET 10 SDK. global.json opts
dotnet test into MTP and TestingPlatformDotnetTestSupport goes. CI and the
README run the test executables directly, which MTP 2 does not change.

CollectionBehavior.DisableTestParallelization is an error in 4.x, which is
what failed Dependabot's #8. The specs keep running in parallel by naming
the same thing in 4.x's terms: Parallelization(Mode = Collections).

Tests 86/86; Specs 36 passed, 6 skipped, as on main.
@crazeydave
crazeydave merged commit 16c5163 into main Oct 19, 2026
6 checks passed
@crazeydave
crazeydave deleted the build/xunit-4 branch October 19, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant