본문으로 건너뛰기
cccskills
무료GitHub에 공개

playwright-test-diagnosis

Analyze playwright test results

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Playwright
설치 방법 보기

포함된 파일(9)

  • SKILL.md3.1 KB
  • architecture.md10.2 KB
  • ci.md4.9 KB
  • configuration.md27.8 KB
  • development.md827 B
  • publishing.md1.4 KB
  • refresh-tracer-viewer.md3.9 KB
  • signing.md5.5 KB
  • statement-video-linking.md16.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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:

## 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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

이 스킬의 문제 신고