From 296d5c9db5b8eec759964bf1e5d6ab6fcb781c9e Mon Sep 17 00:00:00 2001 From: Raghu Date: Thu, 17 Sep 2026 12:43:51 +0100 Subject: [PATCH 1/2] CONFIG: Move The Test Projects To xunit 4 On The Microsoft Testing Platform xunit.v3 4.0.0 and xunit.runner.visualstudio 4.0.0 drop VSTest on the .NET 10 SDK, so global.json opts dotnet test into the Microsoft Testing Platform runner. The package bumps and global.json are coupled: neither builds and tests on its own. All four test projects move together; xunit.analyzers moves to 2.0.0 because xunit.v3 4.0.0 depends on it and the explicit 1.27.0 reference would be a downgrade (NU1605), and Microsoft.NET.Test.Sdk aligned on 18.9.0. --- .../NEL.MESH.Tests.Acceptance.csproj | 8 ++++---- .../NEL.MESH.Tests.Integration.Witness.csproj | 8 ++++---- .../NEL.MESH.Tests.Integration.csproj | 8 ++++---- NEL.MESH.Tests.Unit/NEL.MESH.Tests.Unit.csproj | 8 ++++---- global.json | 5 +++++ 5 files changed, 21 insertions(+), 16 deletions(-) create mode 100644 global.json diff --git a/NEL.MESH.Tests.Acceptance/NEL.MESH.Tests.Acceptance.csproj b/NEL.MESH.Tests.Acceptance/NEL.MESH.Tests.Acceptance.csproj index d9f4c3c..54d238c 100644 --- a/NEL.MESH.Tests.Acceptance/NEL.MESH.Tests.Acceptance.csproj +++ b/NEL.MESH.Tests.Acceptance/NEL.MESH.Tests.Acceptance.csproj @@ -14,16 +14,16 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -31,7 +31,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/NEL.MESH.Tests.Integration.Witness/NEL.MESH.Tests.Integration.Witness.csproj b/NEL.MESH.Tests.Integration.Witness/NEL.MESH.Tests.Integration.Witness.csproj index 456817a..4470cc5 100644 --- a/NEL.MESH.Tests.Integration.Witness/NEL.MESH.Tests.Integration.Witness.csproj +++ b/NEL.MESH.Tests.Integration.Witness/NEL.MESH.Tests.Integration.Witness.csproj @@ -18,15 +18,15 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -34,7 +34,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/NEL.MESH.Tests.Integration/NEL.MESH.Tests.Integration.csproj b/NEL.MESH.Tests.Integration/NEL.MESH.Tests.Integration.csproj index 431d0aa..b9035c7 100644 --- a/NEL.MESH.Tests.Integration/NEL.MESH.Tests.Integration.csproj +++ b/NEL.MESH.Tests.Integration/NEL.MESH.Tests.Integration.csproj @@ -18,15 +18,15 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -34,7 +34,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/NEL.MESH.Tests.Unit/NEL.MESH.Tests.Unit.csproj b/NEL.MESH.Tests.Unit/NEL.MESH.Tests.Unit.csproj index 1d50b16..982aafe 100644 --- a/NEL.MESH.Tests.Unit/NEL.MESH.Tests.Unit.csproj +++ b/NEL.MESH.Tests.Unit/NEL.MESH.Tests.Unit.csproj @@ -14,15 +14,15 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -30,7 +30,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} From 57cc2bd747dc791cc93ecdf4370e0b03b08e75fe Mon Sep 17 00:00:00 2001 From: Raghu Date: Thu, 17 Sep 2026 12:44:01 +0100 Subject: [PATCH 2/2] CODE RUB: Run Tests On The Microsoft Testing Platform In The Build Workflow The Microsoft Testing Platform needs --project to name a single test project, so the Unit (292) and Acceptance (10) steps use it. --ignore-exit-code 8 treats "zero tests ran" as a pass, where VSTest only warned; both projects have tests today, so it keeps the steps in line with the other repos while a real failure still exits 2. The Integration projects still need a live MESH mailbox and stay out of CI. build.yml regenerated from the Infrastructure generator. --- .github/workflows/build.yml | 4 ++-- .../Services/ScriptGenerationService.cs | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 937955d..f9f40b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,9 +33,9 @@ jobs: - name: Build run: dotnet build --no-restore - name: Unit Tests - run: dotnet test NEL.MESH.Tests.Unit/NEL.MESH.Tests.Unit.csproj --no-build --verbosity normal + run: dotnet test --project NEL.MESH.Tests.Unit/NEL.MESH.Tests.Unit.csproj --no-build --verbosity normal --ignore-exit-code 8 - name: Acceptance Tests - run: dotnet test NEL.MESH.Tests.Acceptance/NEL.MESH.Tests.Acceptance.csproj --no-build --verbosity normal + run: dotnet test --project NEL.MESH.Tests.Acceptance/NEL.MESH.Tests.Acceptance.csproj --no-build --verbosity normal --ignore-exit-code 8 add_tag: name: Add Tag and Create Release runs-on: ubuntu-latest diff --git a/NEL.MESH.Infrastructure/Services/ScriptGenerationService.cs b/NEL.MESH.Infrastructure/Services/ScriptGenerationService.cs index 236a1e3..0120f95 100644 --- a/NEL.MESH.Infrastructure/Services/ScriptGenerationService.cs +++ b/NEL.MESH.Infrastructure/Services/ScriptGenerationService.cs @@ -83,16 +83,18 @@ public void GenerateBuildScript(string branchName, string projectName, string do { Name = "Unit Tests", - Run = $"dotnet test {projectName}.Tests.Unit/" + - $"{projectName}.Tests.Unit.csproj --no-build --verbosity normal" + Run = $"dotnet test --project {projectName}.Tests.Unit/" + + $"{projectName}.Tests.Unit.csproj " + + "--no-build --verbosity normal --ignore-exit-code 8" }, new TestTask { Name = "Acceptance Tests", - Run = $"dotnet test {projectName}.Tests.Acceptance/" + - $"{projectName}.Tests.Acceptance.csproj --no-build --verbosity normal" + Run = $"dotnet test --project {projectName}.Tests.Acceptance/" + + $"{projectName}.Tests.Acceptance.csproj " + + "--no-build --verbosity normal --ignore-exit-code 8" } } }