Skip to content

Run the test suite through Microsoft Testing Platform - #7

Merged
christophwille merged 2 commits into
mainfrom
mtp-migration
Sep 2, 2026
Merged

Run the test suite through Microsoft Testing Platform#7
christophwille merged 2 commits into
mainfrom
mtp-migration

Conversation

@christophwille

@christophwille christophwille commented Sep 1, 2026

Copy link
Copy Markdown
Member

Migrates the tests from the VSTest stack to Microsoft Testing Platform (MTP), following ILSpy's settled recipe.

  • global.json (new) names Microsoft.Testing.Platform as the dotnet test runner — the .NET 10 SDK's native MTP support. No sdk pin; the repo has never had one.
  • Stampeded.Core.Tests.csproj: OutputType=Exe + EnableNUnitRunner=true; Microsoft.NET.Test.Sdk removed (NUnit3TestAdapter 6.x is the runner itself), Microsoft.Testing.Extensions.TrxReport added.
  • CI calls dotnet test --solution Stampeded.slnx ... --report-trx --results-directory test-results and uploads the TRX per matrix leg even when tests fail, so a failure survives the run.
  • CLAUDE.md documents the new invocation — the bare positional dotnet test <sln> form is VSTest syntax and errors under MTP.

Deliberately skipped, as ILSpy's history showed them obsolete or unneeded: dotnet.config (superseded by the global.json test section), TestingPlatformDotnetTestSupport, and an explicit VSTestBridge reference (build is clean without it). coverlet.MTP is left out because nothing collects coverage today.

Verified locally on Windows: 262 tests, 257 passed / 4 skipped / 1 failed — the failure being the known symlink-privilege-only DoesNotFollowASymlinkOutOfTheWorktree, which passes on CI runners. TRX lands in test-results/, and --filter FullyQualifiedName~... still works (NUnit keeps the VSTest filter format under MTP).

🤖 Generated with Claude Code

dotnet test on the .NET 10 SDK supports MTP natively when global.json names
the runner, which retires the VSTest stack: Microsoft.NET.Test.Sdk goes away,
NUnit3TestAdapter 6.x itself is the runner, and the test project becomes an
executable. The recipe follows ILSpy's settled migration, including what it
discarded along the way: dotnet.config (superseded by the global.json test
section) and TestingPlatformDotnetTestSupport (obsolete). ILSpy's explicit
VSTestBridge reference was not needed here - the build is clean without it.

TRX reporting comes from Microsoft.Testing.Extensions.TrxReport, so a CI
failure survives the run: the workflow writes test-results/ and uploads it
even when tests fail. Coverage (coverlet.MTP) is left out - nothing collects
coverage today.

global.json deliberately has no sdk section: the repo has never pinned an
SDK version and CI selects 10.0.x on its own; pinning should not start as a
side effect of naming the test runner.

Assisted-by: Claude:claude-fable-5:Claude Code
The uploaded artifact answers a deep investigation; the summary page answers
the first question - what failed - without downloading anything. Same
test-summary/action@v2 arrangement ILSpy uses, folded so a green run stays
one line.

Assisted-by: Claude:claude-fable-5:Claude Code
@christophwille
christophwille merged commit 9dbdc19 into main Sep 2, 2026
3 checks passed
@christophwille
christophwille deleted the mtp-migration branch September 2, 2026 07:41
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