Visitar URL original
test_runner: log coverage report generation time by joao-oliveira-softtor · Pull Request #66577 · nodejs/node · GitHub
Skip to content

test_runner: log coverage report generation time - #66577

Open
joao-oliveira-softtor wants to merge 2 commits into
nodejs:mainfrom
joao-oliveira-softtor:test-runner-coverage-timing
Open

joao-oliveira-softtor wants to merge 2 commits into
nodejs:mainfrom
joao-oliveira-softtor:test-runner-coverage-timing

Conversation

@joao-oliveira-softtor

Copy link
Copy Markdown
Contributor

Add a NODE_DEBUG=test_runner timer around coverage.summary() to help
diagnose slow coverage reports, as suggested in #55103.

The timer ends even when summary generation throws, preserving existing
error handling and cleanup. It excludes test execution, reporter output,
and cleanup.

Tests

Added subprocess tests covering:

  • Both process and none isolation modes.
  • Disabled debug logging and disabled coverage.
  • Summary generation failure with real cleanup.

Local validation on Linux: all seven new scenarios, seven targeted
coverage test files, and JavaScript lint passed. The full test suite
and cross-platform CI have not been run.

AI assistance

Codex assisted with implementation, tests, and automated verification.

Refs: #55103

Measure coverage summary generation with the existing debug timer so
NODE_DEBUG=test_runner can help diagnose slow coverage reports. End the
timer when summary generation throws and retain the existing cleanup.

Add subprocess tests for both isolation modes, disabled logging and
coverage, and summary failure with real cleanup.

Refs: nodejs#55103
Assisted-by: a coding agent
Signed-off-by: João Victor <joao.oliveira@softtor.com.br>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (cd18965) to head (82f7ea8).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66577      +/-   ##
==========================================
+ Coverage   90.43%   90.44%   +0.01%     
==========================================
  Files         791      791              
  Lines      276488   276570      +82     
  Branches    53097    53124      +27     
==========================================
+ Hits       250029   250132     +103     
+ Misses      16855    16837      -18     
+ Partials     9604     9601       -3     
Files with missing lines Coverage Δ
lib/internal/test_runner/harness.js 88.33% <100.00%> (+0.20%) ⬆️

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Register node.test_runner in the static Perfetto category registry.
The coverage timer queries this category even when NODE_DEBUG is
unset, and Perfetto aborts when the category is not registered.

Refs: nodejs#55103
Assisted-by: a coding agent
Signed-off-by: João Victor <joao.oliveira@softtor.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentscan:mixed-signals needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants