build: migrate tests to Microsoft.Testing.Platform v2#28
Merged
Conversation
Swap the VSTest stack for Microsoft.Testing.Platform (MTP) v2: - xunit.v3 -> xunit.v3.mtp-v2; drop Microsoft.NET.Test.Sdk and xunit.runner.visualstudio (the MTP in-proc runner replaces them). - coverlet.collector -> Microsoft.Testing.Extensions.CodeCoverage (native MTP coverage). - Opt into the MTP runner via global.json (test.runner) and set OutputType=Exe for test projects. - Add OutputDirectoryAssemblyResolver: the MTP self-host resolves runtime assemblies strictly from .deps.json, and Scribe (a Scribe.Sdk Library) is referenced as a ProjectReference, so it is not a runtime dep. This xUnit pipeline-startup hook probes the output directory so generators can load Scribe at test time. - Strip the netstandard2.0/framework ambiguous system refs in Scribe.Tests (needed once ValueTask is referenced via xUnit ITestPipelineStartup). - CI: run tests via `dotnet test --solution`, emit native xUnit CTRF and Cobertura coverage, and render both to the job summary via ctrf-io/github-test-reporter and danielpalme/ReportGenerator-GitHub-Action. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Surface Directory.Build.props/.targets, Directory.Packages.props, and global.json under Solution Items. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Migrates the test suite from VSTest to Microsoft.Testing.Platform (MTP) v2.
xunit.v3→xunit.v3.mtp-v2; removedMicrosoft.NET.Test.Sdk+xunit.runner.visualstudio(the MTP in-proc runner replaces them).coverlet.collector→Microsoft.Testing.Extensions.CodeCoverage(native MTP coverage).global.json(test.runner); test projects are nowOutputType=Exe.OutputDirectoryAssemblyResolver— the MTP self-host resolves runtime assemblies strictly from.deps.json.Scribeis referenced as aScribe.SdkLibraryProjectReference, which is not a runtime dependency, so tests that instantiate generators touchingScribefailed under MTP (VSTest'stesthosthad masked this via directory probing). ThisITestPipelineStartuphook probes the output directory to resolve them.Scribe.Tests(required onceValueTaskis referenced via xUnit'sITestPipelineStartup).CI
dotnet test --solutionnow emits native xUnit CTRF results (no extra package) and Cobertura coverage, rendered to the GitHub job summary via ctrf-io/github-test-reporter and ReportGenerator. Replaces the old TRX logger + artifact upload.Verification
Scribe.Tests: 497/497 pass under MTP; CTRF + Cobertura emission confirmed locally.🤖 Generated with Claude Code