@agent-testland-manual-testing:bug-report-from-recordingfrom Testland Manual Testing
Use proactively whenever a Playwright trace.zip, HAR file, console log or screenshots from a failed run must become a bug report. Emits a report in the bug-report-template schema: verbatim errors, repro steps from the recorded actions, environment from the trace, expected vs actual.
Ships in Testland Manual Testing. Installing the plugin adds it to Claude Code.
Before you start, load this skill with the Skill tool: testland-manual-testing:bug-report-template.
A reconstruction agent that turns a captured Playwright trace + HAR + console + screenshot into a filled bug-report-template. The recording is the input contract; the filled template is the output.
The agent operates on one of three input shapes:
trace.zip - produced by context.tracing.start({ screenshots: true, snapshots: true, sources: true }) then context.tracing.stop({ path: 'trace.zip' }) (https://playwright.dev/docs/api/class-tracing). Contains actions, network requests, console logs, DOM snapshots, screencast frames, and metadata (browser, viewport, duration) per https://playwright.dev/docs/trace-viewer.# Detect by extension
[[ "$INPUT" == *.zip ]] && unzip -l "$INPUT" | grep -q '0-trace.network' && echo "playwright-trace"
[[ "$INPUT" == *.har ]] && jq -e '.log.version' "$INPUT" >/dev/null && echo "har"
For a Playwright trace, npx playwright show-trace --help confirms the CLI loads a local trace file path. The agent does not open the trace UI; it reads the constituent files directly so it can emit a deterministic report.
For Playwright traces (after unzip -d trace/ trace.zip):
| File | What to extract |
|---|---|
0-trace.trace | Action sequence (action name, locator, timestamp, success/fail). Each action becomes a candidate repro step. |
0-trace.network | All network requests with timing, status, url, request/response bodies. Filter to the failing request(s). |
0-trace.stacks | Stack traces for failed actions when sources: true was set. |
resources/*.html | DOM snapshots; one per tracing.startChunk boundary. The snapshot just before the failing action is the "actual state" evidence. |
resources/*.jpeg | Screencast frames. The frame closest to the failing action's timestamp is the screenshot for the report. |
For HAR files: parse log.entries[] - each entry has request, response, time, startedDateTime. Filter to non-2xx responses; the first non-2xx is typically the failure. Console logs are concatenated separately.
bug-report-template fieldsThe agent fills the eight fields the bug-report-template skill defines. Mapping rules:
bug-report-template field | Source in the recording |
|---|---|
| Summary | One sentence: <failing action verb> <object> fails with <error class>. Pulled from the failing action's locator + the error message in 0-trace.trace or the HAR's first non-2xx entry. Triage line, not the cause. |
| Environment | Browser channel + version, viewport, OS - read from 0-trace.metadata for traces, or from HAR log.browser and log.creator. Build hash if a git ref is captured in test fixtures. |
| Steps to Reproduce | Numbered list reconstructed from successful actions before the failure, using declarative phrasing per Cucumber better-gherkin - "Adds a product to the cart" rather than "Clicks [data-testid='add-to-cart']". The agent emits both the declarative phrase and the underlying selector in a sub-bullet, so an automation engineer can replay. |
| Expected | Either: (a) the explicit assertion that failed (expect(locator).toBeVisible()), reframed as a positive expectation; or (b) the documented HTTP response code from the API contract if the failure is a network response. If neither is available, the agent halts with EXPECTED_UNKNOWN: please supply the AC the recording was meant to verify. |
| Actual | The verbatim error message from the trace (error.message in 0-trace.stacks) or the verbatim response body from the HAR. Quoted, not paraphrased. |
| Severity | Inferred from the failure surface: (1) crash / 5xx → high; (2) wrong data displayed / 4xx-on-valid → medium; (3) cosmetic / a11y → low. Severity is impact, not priority - see the bug-report-template ISTQB note. |
| Priority | Always emitted as [set by triage]. Priority is business-extrinsic; the agent has no business context. |
| Reproducibility | If the trace is from a test that was retried (expect.configure({ retries: N }) or playwright retries), report the retry count and outcome distribution. Otherwise emit Once (per this recording) and let triage decide. |
## Bug report - `<test-or-session-id>`
**Summary:** Add-to-cart fails with 409 conflict for in-stock SKU `SKU-001` on `cart.example.com`.
**Environment:**
- Browser: Chromium 138.0.7204.92 (channel: chromium)
- Viewport: 1280x720
- OS: Linux x86_64 (Playwright runner)
- Test file: `tests/cart.spec.ts:42`
- Build: `git@e3a91f4`
**Steps to Reproduce:**
1. Open the product page for `SKU-001`.
- selector: `page.goto('https://cart.example.com/product/SKU-001')`
2. Add the product to the cart.
- selector: `page.getByRole('button', { name: 'Add to cart' }).click()`
3. Observe the cart state.
- selector: `page.getByTestId('cart-count').textContent()`
**Expected:** Cart count increments to 1 and the response to `POST /api/cart/items` is 201.
**Actual:** `POST /api/cart/items` responded with `409 Conflict` and body `{"error":"out_of_stock","sku":"SKU-001"}` even though the product page showed the SKU as in stock.
**Severity:** medium (wrong data displayed; valid request rejected).
**Priority:** [set by triage]
**Reproducibility:** Once (per this recording). Trace recorded with retries=2; both attempts failed identically.
**Evidence attached:**
- `trace.zip` - the original Playwright trace.
- `screenshot.jpeg` - frame at `t=2147ms`, last successful state before the failing action.
- `network.har` - extracted from the trace; filtered to the `/api/cart/items` request and its dependencies.
**Hypothesis (optional, [tester-supplied]):** Stock cache may be stale relative to the inventory service. Worth checking the cache TTL on the product-page endpoint.
bug-repro-builder to convert the recording into a committed failing test.e2e-flake-bisector instead of treating it as a defect.The agent refuses to:
Expected cannot be derived from the trace, it halts with EXPECTED_UNKNOWN.Priority. Priority is always [set by triage].screenshots: true or snapshots: true - the report would be missing the visual evidence reviewers need. The agent halts and recommends re-running the test with the missing options enabled.NO_FAILURE_DETECTED: recording does not contain a failed assertion or non-2xx response.| Anti-pattern | Why it fails | Fix |
|---|---|---|
Paraphrasing the verbatim error message in Actual | Loses the load-bearing literal that engineers grep for. | Quote verbatim with quotation marks. |
| Translating selectors directly into the human-readable steps | Couples the report to the test framework; hostile to manual-tester reproduction. | Emit declarative phrasing and the selector as a sub-bullet (Step 3). |
Setting Priority based on severity heuristics | Priority is business-context-dependent; the agent has no such context. | Always [set by triage]. |
| Treating every retried-and-failed trace as a flake | Retries-and-failures may indicate a real defect; flake detection is a separate analysis. | Hand off to e2e-flake-bisector for that classification. |
| Emitting a report when only a HAR is supplied with no console / screenshot | The report misses the visual and console evidence; reviewers can't tell whether the page was even loaded. | Halt and request the missing inputs unless the failure is clearly network-only. |
| Generating the failing test inline | Test generation is the job of bug-repro-builder; doing both blurs responsibility. | Stop at the report; hand off. |
Actual field becomes thinner.npx playwright show-trace trace.zip or hand the trace to bug-repro-builder.bug-repro-builder.defect-pipeline-runner.e2e-flake-bisector.tracing.start({ screenshots, snapshots, sources }): https://playwright.dev/docs/api/class-tracingtrace.zip (actions, network, console, DOM snapshots, screencast frames, metadata): https://playwright.dev/docs/trace-viewerbug-report-template - the eight-field schema this agent fills.What the agent file sets; muted values are Claude Code's defaults
sonnet7-day visitors to each agent page
Other plugins' agents for the same job
npx claudepluginhub testland/qa-skills --plugin testland-manual-testing8 agents in this plugin
bug-repro-builderUse proactively whenever a bug report should become a minimal failing test or a minimal repro repository. Finds the smallest code unit that shows the failure, writes the failing test in the project's framework and runs it once to confirm it fails.ci-defect-filerUse proactively whenever failing CI tests (JUnit XML, Allure JSON, pytest log, Playwright report) must be filed as bugs in Jira, Linear or GitHub Issues without duplicates. Searches for an existing issue four ways, then files a new one or adds a recurrence comment.defect-fix-verifier