Skip to content

test: migrate main solution tests to xUnit v3 and MTP - #922

Open
Gavin Barron (gavinbarron) wants to merge 2 commits into
mainfrom
gavinbarron-xunit-mtp-main-squash-port
Open

Gavin Barron (gavinbarron) wants to merge 2 commits into
mainfrom
gavinbarron-xunit-mtp-main-squash-port

Conversation

@gavinbarron

Copy link
Copy Markdown
Contributor

Summary

  • Port the actual merged support/v2 squash from test: migrate support/v2 tests to xUnit v3 and MTP #915 with git cherry-pick -x: da8d925298eddd94308ebf489bcaa167c70328a7. This branch starts at main 78cea07957a8ee3fef32b0409cb605f2bbde1349; it does not reuse the premature main implementation.
  • Migrate Reader to xUnit v3/Microsoft.Testing.Platform and run both test projects through one native solution-wide dotnet test invocation in each of the four pipelines. Align TRX publication, local scripts, editor tasks and documentation.
  • Retain main's newer package versions, target frameworks and artifact pins. Add explicit Reader testconfig.json for Coverlet 10.1.0: passing tests with CLI include filters alone reproduced an empty Reader report. Sonar now rejects empty, missing or unexpected-module coverage and requires covered Reader/Hidi sequence points.
  • Preserve main's current deployment routing, release/tag gates, service connections, ESRP versions, signing and signed-payload handling, and measured Pester coverage.

Refs #885

Validation

  • Baseline and migrated Debug/Release solution builds succeeded.
  • Each migrated configuration ran 1,393/1,393 solution tests: Reader 1,286 and Hidi 107, with zero failures or skips and matching counters in two TRX reports.
  • Debug OpenCover: Reader 9,425/10,280 sequence points visited; Hidi 987/1,098. Release Cobertura: Reader 6,855/7,390 lines visited; Hidi 760/833. Both report sets contain only the intended Reader/Hidi modules.
  • Empty solution discovery with --minimum-expected-tests 1 exits 9 for both assemblies. The exact Sonar guard accepts measured reports and rejects empty, missing, unexpected-module and missing-product coverage.
  • All 45 Pester tests passed; both helpers had 100% measured command coverage, with 38/38 and 26/26 covered lines.
  • Checked YAML/JSON/PowerShell syntax, editor task dependencies, evaluated project properties and unchanged release/signing/Pester settings against main.

Validation ran on Windows; the Linux solution command retains -p:EnableWindowsTargeting=true, but Linux execution, hosted deployments, production signing and authenticated Sonar upload were not run.

Align Reader with Hidi's support/v2 test dependencies and use native solution-wide MTP execution in CI, releases, local scripts and editor tasks. Preserve signed framework targets, test classification, TRX publication and scoped OpenCover/Cobertura coverage.

Refs #885

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d5321d35-1d8c-469c-86bf-08e0856ceeee
(cherry picked from commit da8d925)
Preserve the cherry-picked squash commit's original metadata and record this verified main-port session without rewriting the migration commit.

Refs #885

Source-Squash: da8d925
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 62e0bd14-dd81-4079-8a1c-b043a03532f0
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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