Status: Done (2026-02-21)
Priority: Low
Component: test/bin/testrunner.ps1, test/bin/testrunner.Tests.ps1
Description:
Codecov could not display line-by-line coverage because Pester's JaCoCo XML embeds a common-parent-leaf prefix (e.g., shortcuts/) in package names and full relative paths in sourcefile names. Codecov constructs paths as <package>/<sourcefile>, producing doubled paths like shortcuts/bin/bin/install.ps1. Added ConvertTo-RelativeJaCoCoXml to strip the prefix and reduce sourcefile names to bare filenames. Also added Import-XmlWithoutDtd helper to handle JaCoCo's DOCTYPE declaration under strict mode.
Acceptance Criteria:
-
ConvertTo-RelativeJaCoCoXmlhelper function added totestrunner.ps1 - Strips common-parent-leaf prefix from
packagenameattributes - Strips common-parent-leaf prefix from
classnameattributes - Reduces
sourcefilenameto bare filename - Reduces
classsourcefilenameto bare filename - Handles single and multiple packages
- File is saved as valid XML
- Unit tests in
testrunner.Tests.ps1 - All existing tests continue to pass