Skip to content

Move the test runner to Microsoft.Testing.Platform - #41

Merged
kkdev92 merged 1 commit into
mainfrom
chore/migrate-to-mtp
Aug 21, 2026
Merged

Move the test runner to Microsoft.Testing.Platform#41
kkdev92 merged 1 commit into
mainfrom
chore/migrate-to-mtp

Conversation

@kkdev92

@kkdev92 kkdev92 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

xunit.v3 4.0 drops the VSTest path on the .NET 10 SDK, which is why Dependabot's bump (#35) could
not be merged. Taking it means opting into the MTP mode of dotnet test.

What changes

  • global.json gains test.runner
  • dotnet test takes --project / --solution rather than a bare path, and filters become MTP
    options after a --: --filter-not-trait Category=Package in place of
    --filter "Category!=Integration&Category!=Package"
  • xunit.runner.visualstudio is the VSTest adapter and is no longer referenced
  • the same rewrite in ci.yml, release.yml, integration.yml, and in every command printed in
    the README, CONTRIBUTING, the pull request template and docs/compatibility.md

The one behaviour that changes

The integration project is no longer filtered out of the ordinary test pass. Under MTP an assembly
that matches no tests fails the run rather than printing a note, so excluding it would turn CI
red. It is discovered and skips itself for want of a credential — which also means a break in that
project surfaces in CI rather than at release.

Verification

Compared against the pre-migration run per assembly, not on the total, since a total can match
while assemblies shift:

assembly before after
Authentication.Tests 107 107
CodeGen.Tests 105 105
ContractTests 62 62
Tests 177 177
Webhooks.Tests 64 64
IntegrationTests excluded 1 skipped
package pass 39 39

dotnet format and the generated-source verification are unchanged and green.

The three failure modes the design rests on were reproduced before relying on them:

result
also exclude Category=Integration exit 8, one assembly errors — this is why it is not excluded
drop the filter entirely 555 instead of 516, so the filter is doing work
mistype the option name exit 5 with zero tests, not a quiet pass

That last one matters most: a filter that is silently ignored looks exactly like a filter that
works. --filter "Category!=Package" is accepted and ignored under MTP, which is the trap this
was checked against.

This also removes the Dependabot ignore rule added in #39, which named this migration as its exit
condition.

🤖 Generated with Claude Code

xunit.v3 4.0 drops the VSTest path on the .NET 10 SDK, so taking it means
opting into the MTP mode of `dotnet test`: a `test.runner` entry in
global.json, `--project`/`--solution` instead of a bare path, and filters
expressed as MTP options after a `--`. xunit.runner.visualstudio is the
VSTest adapter and is no longer referenced.

One behaviour changes. The integration project is no longer filtered out of
the ordinary test pass, because under MTP an assembly that matches no tests
fails the run rather than printing a note. It is discovered and skips itself
for want of a credential, which also means a break in that project now
surfaces in CI rather than at release.

Verified against the pre-migration run, per assembly rather than on the
total: Authentication 107, CodeGen 105, Contract 62, Tests 177, Webhooks 64,
and the package pass 39 — every one unchanged, with integration adding a
single skip. The three failure modes behind the design were reproduced
first: excluding integration fails the run, dropping the filter pulls the 39
package tests back in, and a mistyped option name errors rather than
quietly passing.

This also removes the Dependabot ignore rule added for the major, which was
its stated exit condition.

Co-authored-by: kkdev92 <kkdev92@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@kkdev92
kkdev92 merged commit b3260f3 into main Aug 21, 2026
10 checks passed
@kkdev92
kkdev92 deleted the chore/migrate-to-mtp branch August 21, 2026 01:07
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