Skip to content

chore: Track code coverage of the built module in the Pester task#140

Open
tablackburn wants to merge 2 commits into
mainfrom
claude/psake-project-next-item-6mfurr
Open

chore: Track code coverage of the built module in the Pester task#140
tablackburn wants to merge 2 commits into
mainfrom
claude/psake-project-next-item-6mfurr

Conversation

@tablackburn

Copy link
Copy Markdown
Contributor

Summary

No changelog entry: repository-internal change only.

Test Plan

  • ./build.ps1 -Task Test locally: 391 passed, 0 failed; summary line prints (Code coverage: 4.2 % of analyzed commands executed (44 of 1044)) and tests/out/coverage.xml is produced (valid JaCoCo)
  • CI matrix green; coverage line visible in each leg's log

Breaking Changes

None.

🤖 Generated with Claude Code

https://claude.ai/code/session_011semwa5HU1BUKKL4RoWjKa


Generated by Claude Code

Enable Pester code coverage over the built module output, write a
JaCoCo report to tests/out/coverage.xml, and print a one-line summary
in the task output so the number is visible in every CI log. Tracking
only - no threshold gate: the number understates real coverage because
tests that exercise code in child processes (the build.tests.ps1 child
builds and the Test-PSBuildPester subprocess matrix) are invisible to
session instrumentation. Publishing the report from CI is #139.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011semwa5HU1BUKKL4RoWjKa
Copilot AI review requested due to automatic review settings July 10, 2026 18:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Pester 6 code coverage tracking for the repository’s Pester psake task by instrumenting the built module output and emitting a JaCoCo coverage report alongside the existing NUnit test results.

Changes:

  • Turn on Pester code coverage for $settings.ModuleOutDir and write JaCoCo output to tests/out/coverage.xml.
  • Print a one-line coverage summary in the Pester task output after Invoke-Pester completes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread psakeFile.ps1 Outdated
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

Test Results

    4 files  ±0    664 suites  ±0   2m 53s ⏱️ +29s
  405 tests ±0    403 ✅ ±0   2 💤 ±0  0 ❌ ±0 
1 624 runs  ±0  1 577 ✅ ±0  47 💤 ±0  0 ❌ ±0 

Results for commit 195c66b. ± Comparison against base commit 3cd758e.

♻️ This comment has been updated with latest results.

Address review feedback on #140: the argument list relied on comma
binding tighter than -f, with a grouping paren that closed after the
first argument. The output was correct, but the code read as if only
one argument were grouped. Group all three arguments explicitly.

Verified: coverage summary line prints identically (391 tests passed).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011semwa5HU1BUKKL4RoWjKa
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.

3 participants