Skip to main content

heal vs review

Auto-healing patches the test. That's fast — but on its own it can look like papering over the real problem: the source change that broke the selector. So e2e-healer offers a second mode. Same diagnosis engine, two outputs — choose per project or per PR.

heal — patch the test

The default. The engine patches the broken selector/wait and re-runs the suite until it's green (or the loop cap is hit), then writes the fix back:

Before
await page.click('#submit-btn')
After
await page.click('#submit')
id changed: #submit-btn → #submit — patched, assertion untouched

Best when the UI change is intentional and the test simply needs to catch up. The output is a small, reviewable diff (or a patch PR in CI).

Quickstart — GitHub Action · Quickstart — CLI

review — advise the fix at the source

Review mode diagnoses why the selector broke and posts source-level suggestions as inline PR comments. It never edits the test:

💬 This className rename broke the #cta selector. Add a stable data-testid, or switch the test to getByRole('button', { name: 'Get started' }) so it survives styling changes.

Best when the break is a symptom of a brittle selector and you'd rather fix the root cause — nudging the team toward resilient, accessibility-first selectors.

PR review bot guide · Resilient selectors

Which should I pick?

healreview
Edits the test?Yes — patches selector/waitNo — comments only
OutputPatched file / patch PRInline PR comments
CI exit0 healed, non-zero if it gave upAlways 0 — branch on has_findings
Reach for it whenThe UI change is intentionalThe selector itself is the smell

A common setup: heal on internal/rapidly-changing apps where tests should just keep up, and review on codebases where you're actively hardening selectors. You can even run both — heal to stay green, review to drive long-term selector quality.

In CI, select the mode with the mode: input:

- uses: Lee-Dongwook/E2E-Self-Heal@v0.4.0
with:
mode: review # default is "heal"
test-path: tests/example.spec.ts
nvidia-api-key: ${{ secrets.NVIDIA_API_KEY }}
diff-base: ${{ github.event.pull_request.base.sha }}

:::warning Scope guardrail Both modes are read-only toward your assertions and test logic. heal touches only selectors/waits; review touches nothing — it just advises. :::

Next steps