Repository navigation
CONFIG: Move The Test Projects To xunit 4 On The Microsoft Testing Platform - #45
Merged
morgang-adappt merged 1 commit intoOct 15, 2026
Merged
Conversation
…atform Migrates all six test projects from xunit 2.9.3 to xunit.v3 4.0.2, with xunit.runner.visualstudio 4.0.1 and Microsoft.NET.Test.Sdk 18.11.0, and opts the repo into the Microsoft Testing Platform through global.json. The runner 4.x line no longer supports VSTest on the .NET 10 SDK, so the package move and the global.json switch are coupled: neither builds nor runs tests on its own. Once global.json selects the platform, every test project must use it, so the projects had to move together. Also brings the Microsoft.Extensions family to 10.0.13 as one coupled set. FluentAssertions stays locked at [7.2.2]. The build workflow now runs tests in the Microsoft Testing Platform form. The platform rejects a bare directory, so the three discovery loops pass each project with --project, and --ignore-exit-code 8 treats "zero tests ran" as a pass where VSTest only warned; a real failure still exits 2. The workflow was regenerated from the Infrastructure generator, not hand-edited, and running the generator twice produces identical files. pages.yml runs no tests and needs no equivalent change. Tests: 298 across all six projects, all passing.
There was a problem hiding this comment.
🔵 Needs a closer look
The coupled runner and package migration needs human confirmation of SDK compatibility, test discovery, and CI failure propagation.
0 open findings
What changed in this PR
Migrates all six test projects to xunit.v3 4.0.2 and Microsoft Testing Platform, keeping generated CI commands aligned with the new runner.
Changes:
- Updates test packages while preserving the FluentAssertions pin.
- Selects Microsoft Testing Platform and updates workflow generation and test commands.
- Aligns Microsoft.Extensions packages at 10.0.13.
| File | Description |
|---|---|
| NHSDigital.ApiPlatform.Sdk/NHSDigital.ApiPlatform.Sdk.csproj | Updates Microsoft.Extensions dependencies. |
| NHSDigital.ApiPlatform.Sdk.Tests.Unit/NHSDigital.ApiPlatform.Sdk.Tests.Unit.csproj | Migrates SDK unit-test packages. |
| NHSDigital.ApiPlatform.Sdk.Tests.Integration/NHSDigital.ApiPlatform.Sdk.Tests.Integration.csproj | Migrates test packages and updates configuration dependencies. |
| NHSDigital.ApiPlatform.Sdk.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance.csproj | Migrates SDK acceptance-test packages. |
| NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit.csproj | Migrates ASP.NET Core unit-test packages. |
| NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration.csproj | Migrates test packages and updates configuration dependencies. |
| NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance.csproj | Migrates ASP.NET Core acceptance-test packages. |
| NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs | Generates platform-compatible test commands. |
| global.json | Selects Microsoft Testing Platform. |
| .github/workflows/build.yml | Uses updated test commands and permits zero-test exits. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
morgang-adappt
approved these changes
Oct 15, 2026
morgang-adappt
deleted the
users/perirrs/CONFIG-xunit-4-testing-platform
branch
October 15, 2026 15:35
This was referenced Oct 15, 2026
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.
Continues the test-platform wave on top of the ADotNet 6.0.0 sweep already on main.
What changes
xunit.v34.0.2, withxunit.runner.visualstudio4.0.1 andMicrosoft.NET.Test.Sdk18.11.0.global.jsonoptsdotnet testinto the Microsoft Testing Platform runner. The runner 4.xline no longer supports VSTest on the .NET 10 SDK, so the packages and
global.jsonarecoupled: neither builds nor runs tests alone. Once
global.jsonselects the platform everytest project in the repository must use it, so the projects move together.
[7.2.2].--ignore-exit-code 8,which treats "zero tests ran" as a pass where VSTest only warned; a real failure still exits 2.
Changed in the generator and regenerated, not hand-edited; running the generator twice produces
identical files.
pages.ymlruns no tests and needs no equivalent change.Tests
Restore and build are clean (0 errors). All 298 tests pass across the six projects, run in the
same shape the workflow runs them.
closes AB#30046