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:
await page.click('#submit-btn')await page.click('#submit')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
classNamerename broke the#ctaselector. Add a stabledata-testid, or switch the test togetByRole('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?
heal | review | |
|---|---|---|
| Edits the test? | Yes — patches selector/wait | No — comments only |
| Output | Patched file / patch PR | Inline PR comments |
| CI exit | 0 healed, non-zero if it gave up | Always 0 — branch on has_findings |
| Reach for it when | The UI change is intentional | The 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
- Auto-heal on PR — the full heal workflow with a patch PR.
- PR review bot — wire up review mode end to end.