@@ -163,6 +163,14 @@ The [PSModule - SourceCode tests](./scripts/tests/SourceCode/PSModule/PSModule.T
163163 - [ PSModule framework settings for style and standards for modules] ( https://github.com/PSModule/Test-PSModule?tab=readme-ov-file#module-tests )
164164 - [ PSScriptAnalyzer rules] ( https://github.com/PSModule/Invoke-ScriptAnalyzer )
165165- This produces a JSON-based report that is used by [ Get-PesterTestResults] ( #get-test-results ) evaluate the results of the tests.
166+ - ** Code coverage for framework-generated code** : This step collects code coverage for framework-generated
167+ boilerplate. During the [ build step] ( #build-module ) , [ Build-PSModule] ( https://github.com/PSModule/Build-PSModule )
168+ injects boilerplate code into the compiled ` .psm1 ` file — including type accelerator registration for public classes
169+ and enums, and the ` OnRemove ` cleanup hook. The framework tests in
170+ [ Test-PSModule] ( https://github.com/PSModule/Test-PSModule ) exercise these code paths and produce coverage artifacts
171+ that are aggregated with coverage from [ Test-ModuleLocal] ( #test-module ) in the
172+ [ Get code coverage] ( #get-code-coverage ) step. This keeps framework-generated lines from counting against the module
173+ author's coverage report.
166174
167175### Test module
168176
@@ -299,6 +307,9 @@ The [PSModule - Module tests](./scripts/tests/Module/PSModule/PSModule.Tests.ps1
299307
300308[ workflow] ( ./.github/workflows/Get-CodeCoverage.yml )
301309- Gathers the code coverage from the previous steps and creates a summary of the results.
310+ - Aggregates coverage from the [ Framework test] ( #framework-test ) step (framework-generated boilerplate) and the
311+ [ Test module] ( #test-module ) step (module author code). A command executed in either step counts as covered, so
312+ framework-generated lines do not count against the module author's coverage target.
302313- If the code coverage is below the target, the workflow will fail here.
303314
304315### Publish module
0 commit comments