feat(test-sdk): expose SDK-owned coverage settings path by xshaheen · Pull Request #34 · xshaheen/headless-sdk · GitHub
Skip to content

feat(test-sdk): expose SDK-owned coverage settings path - #34

Merged
xshaheen merged 4 commits into
mainfrom
xshaheen/coverage-settings-contract
Aug 8, 2026
Merged

feat(test-sdk): expose SDK-owned coverage settings path#34
xshaheen merged 4 commits into
mainfrom
xshaheen/coverage-settings-contract

Conversation

@xshaheen

@xshaheen xshaheen commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

External Microsoft Testing Platform module runners can now resolve the Test SDK's packaged coverage denominator policy instead of maintaining a consumer-owned copy. Project-evaluated runs use the same public HeadlessCoverageSettingsPath property when the SDK injects --coverage-settings, so both execution modes share one policy owner.

The policy keeps every intentional generated-code, migration, and test-assembly exclusion and adds a cross-platform obj/**/generated/** defense for compiler and source-generator output with unconventional filenames. Semantic package tests prove the new rule does not exclude ordinary handwritten source or partial classes.

Consumption contract

  • Resolves an absolute, existing packaged settings path in project-SDK, global.json SDK, additional-SDK, and PackageReference consumption.
  • Injects --coverage and exactly one property-backed --coverage-settings argument when EnableCodeCoverage=true.
  • Documents why --test-modules cannot receive SDK-injected project arguments and shows external tooling how to query, validate, quote, and pass the SDK-owned path.
  • Keeps explicit MSBuild values authoritative while providing the packaged path as the default.

Validation

  • CSharpier repository check: passed (24 files checked).
  • Restore: passed; all projects up to date.
  • Release build: passed with 0 warnings and 0 errors.
  • Release pack: passed; six 0.2.2-preview.0.5 packages produced.
  • Focused packed-package contracts: 5 passed, 0 skipped, 0 failed.
  • Full packed-package suite: 159 total, 157 passed, 2 skipped, 0 failed in 9m 02s.
    • Skips are the Windows-only WPF and Windows Forms consumer builds on macOS.
  • Packed Headless.NET.Sdk.Test archive inspected: build/SupportTestProjects.targets and configurations/default.runsettings are present, with the public property, property-backed argument, and approved exclusions.

Follow-up boundary

The downstream framework module runner still needs to resolve this property, retain its Cobertura regression verifier, and remove its duplicated eng/coverage.runsettings. This PR does not modify Headless Framework, bump an SDK version, publish packages, release, or merge.

Related: xshaheen/headless-framework#814

Post-Deploy Monitoring & Validation

There is no production runtime deployment. For the first downstream adoption, query the property after restore and require a fully qualified existing file before starting the module runner. A missing/empty path or a Cobertura denominator change is the regression signal; the SDK and framework PR authors own that adoption check.

@xshaheen
xshaheen merged commit 145f988 into main Aug 8, 2026
4 checks passed
@xshaheen
xshaheen deleted the xshaheen/coverage-settings-contract branch August 8, 2026 21:54
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