Playwright Logbook workflow for debugging test failures and sharing evidence with coding assistants
说明与用途
Playwright Logbook 提供单一 HTML 报告,包含错误诊断和可通过 CLI 生成的调试包,便于与代码助手协作.
问题
Developers need a centralized way to capture test failures, retry history, and detailed diagnostics to investigate issues and provide clear evidence to coding assistants.
结果
Playwright Logbook centralizes failure diagnostics and provides a reproducible debug packet, enabling efficient triage and collaboration with coding assistants.
工作流
- Install Playwright Logbook with
npm install --save-dev playwright-logbook - Add the reporter to
playwright.config.tsenablingcaptureDetails: trueand optionaltrace: 'on-first-retry' - Run tests using
npx playwright test - Open the generated
.logbook/report/index.htmllocally to view failure diagnostics, retry history, and test details - Locate the test ID in
.logbook/runs/<run-id>.jsonand generate a debug packet withnpx playwright-logbook debug --run latest --test <TEST_ID> --format json - Copy the debug context or share the JSON packet with the coding assistant for focused investigation
证据
Playwright Logbook is an open-source reporter that keeps failure diagnostics, retries, run-to-run changes and history in one local HTML report.
the CLI offers a debug packet for one test in one run:
captureDetails defaults to false. The example opts in to extra diagnostics.
- 记录日期: 2026-10-06T00:41:08.543Z