Skip to content

test: support inspecting WPTs in child processes - #65510

Open
panva wants to merge 2 commits into
nodejs:mainfrom
panva:wpt-inspect
Open

test: support inspecting WPTs in child processes#65510
panva wants to merge 2 commits into
nodejs:mainfrom
panva:wpt-inspect

Conversation

@panva

@panva panva commented Aug 23, 2026

Copy link
Copy Markdown
Member

This addresses the inspector debugging limitation described in #51854 and builds on the selectable thread/process WPT backend introduced in c757550.

WPT specs running in worker threads make attaching an inspector to an individual test difficult, this adds an opt-in WPT_INSPECT mode that:

  • Forces the process backend
  • Requires the selector to resolve to exactly one non-worker WPT variant
  • Starts the child with --inspect-brk=0
  • Forwards the debugger URL from child stderr
  • Rejects dedicated-worker variants because the debugger attaches to the child-process harness, while their test code executes in a Worker created by that harness

Also document WPT execution backends (which I failed to do in c757550), source and generated test selectors, runner options, and the inspector workflow.

panva added 2 commits August 23, 2026 21:39
Describe how to run WPT modules, select source files or generated
tests, and choose the existing thread or process backend. Document the
WPTRunner options and remove duplicated run instructions.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Add WPT_INSPECT to launch one generated main-thread test with
--inspect-brk on an available port. Forward debugger stderr so an
inspector client can attach while the child is paused.

Require an exact generated test path and reject worker variants, whose
test code runs in a nested Worker. Cover backend precedence, selector
errors, inspector attachment, and clean shutdown.

Refs: nodejs#51854
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
@panva
panva requested a review from joyeecheung August 23, 2026 19:57
@panva panva added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Aug 23, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/web-standards

@panva
panva requested a review from avivkeller August 23, 2026 19:57
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Aug 23, 2026
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (453f47a) to head (a01030b).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65510      +/-   ##
==========================================
- Coverage   90.14%   90.12%   -0.02%     
==========================================
  Files         751      751              
  Lines      252709   252709              
  Branches    47557    47560       +3     
==========================================
- Hits       227800   227750      -50     
- Misses      16206    16255      +49     
- Partials     8703     8704       +1     

see 35 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.

@avivkeller avivkeller added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 24, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 24, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants