Skip to content
Back to skills

Docs

ASecurity

Analyze playwright test results

  • 46 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
toolsgogitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add heal-dev/heal-playwright-tracer --skill docs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/heal-dev-docs/badge)](https://www.skillsdirectory.com/skills/heal-dev-docs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: playwright-test-diagnosis
description: Analyze playwright test results
---

## Goal

Turn `heal-traces.ndjson` into a concise root-cause report with statement-level evidence.

## Inputs To Locate

- `heal-traces/<executionId>/<playwrightTestId>/<attempt>/heal-traces.ndjson`
- Sibling artefacts in the same `<attempt>/` dir: `trace.zip`,
  `screenshots/stmt-*.png`, `videos/<file>.webm` (when present)
- `heal-traces/executions.ndjson` — append-only run index; the latest
  line is the most recent run
- `heal-traces/<executionId>/execution.json` — per-run manifest
  (totals, git, duration, per-test summaries)
- The test file mentioned in the trace (`statement.loc` and source text)

If multiple trace files exist, prioritize the latest failing attempt.
`<executionId>` is an auto-generated uuidv4 per run; pick the newest
entry in `executions.ndjson` to find the most recent execution dir.

## Workflow

1. Find the `test-result` event and note final status, duration, stderr, and stdout.
2. Scan statement events in order and identify:
   - first failing statement (`status != ok`)
   - last successful statement before failure
   - slow statements (`durationMs` outliers)
3. Extract high-signal fields from failing/nearby statements:
   - `source`
   - `loc.line` and file context
   - captured variable values
   - serialized error payload
   - screenshot references (if present)
4. Build a timeline:
   - setup/context
   - trigger statement
   - error manifestation
   - propagation/teardown
5. Correlate with external signals:
   - network/API response mismatches
   - assertion target mismatch vs highlighted locator screenshot
   - helper-function internal state that does not surface in standard Playwright trace
6. Propose a minimal next action:
   - test fix
   - app fix
   - synchronization/waiting fix
   - selector/locator fix

## Heuristics

- Prefer the earliest causal mismatch, not the final thrown assertion.
- Treat statement-level values as source of truth when they contradict log text.
- Call out hidden helper failures explicitly (they are often invisible in action-level traces).
- For flaky behavior, compare passing and failing runs at the first diverging statement.
- Keep confidence explicit: `high`, `medium`, or `low`.

## Output Format

Use this structure:

```markdown
## Test Failure Analysis

- Test: <name>
- Status: <failed/passed>
- Confidence: <high|medium|low>

### What failed

- <1-2 bullets with exact failing statement and error>

### Root cause hypothesis

- <most likely cause tied to statement-level evidence>

### Evidence

- <statement source + line + key variable values>
- <timing or API correlation>
- <screenshot/locator evidence if available>

### Recommended fix

- <smallest practical change>

### Verification

- Re-run: <command>
- Expectation: <what should change in trace>
```

## Quick Commands

Use fast filters when needed:

- failing lines: `rg '"status":"(fail|error)"' heal-traces -g "*.ndjson"`
- slow statements: `rg '"durationMs":[1-9][0-9]{3,}' heal-traces -g "*.ndjson"`
- error payloads: `rg '"error"|\"stderr\"' heal-traces -g "*.ndjson"`
- latest run dir: `tail -n 1 heal-traces/executions.ndjson` → read `executionId`

Files in this skill

  • SKILL.md3.1 KB
  • architecture.md10.2 KB
  • ci.md4.8 KB
  • configuration.md23.2 KB
  • development.md770 B
  • publishing.md1.4 KB
  • refresh-tracer-viewer.md3.9 KB
  • signing.md5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.