I built a free HTML test reporter for Playwright, Jest, Vitest and Cucumber.js that automatically captures API calls, screenshots and retries
说明与用途
为 Playwright、Jest、Vitest 和 Cucumber.js 构建了一个免费的 HTML 测试报告器,自动捕获 API 调用、截图和重试信息,生成单个自包含报告,无需修改测试。
问题
When a test fails in CI, developers need to know the API response, screen state, retry behavior, and flakiness, but default reports only show assertions and stack traces.
结果
The reporter automatically captures API calls, screenshots, logs, and retry data across multiple frameworks, producing a single HTML file that can be attached to tickets or shared as a CI artifact.
工作流
- Install the appropriate @acereports package via npm
- Add the reporter configuration to the test framework config (e.g., playwright.config.ts, jest.config.js, vitest.config.ts, cucumber.js)
- Run tests normally; the reporter writes TestResults/AceReport_.html
- Open the HTML file to view API calls, screenshots, logs, and retry details
- Optionally add custom logs or screenshots using the ace API in test code
证据
When a test fails in CI, I usually end up asking the same questions: What did the API actually return? What was on the screen when it failed? Did it fail on the first try, or only on the retry? Is this test flaky, or did something really break?
It already existed for .NET, Java and Python, and it’s now on npm for TypeScript/JavaScript.
Every API call: method, URL, request and response bodies, status and duration. It hooks Node’s http/https and the global fetch, so it covers axios, fetch, got, supertest, node-fetch, ky and Playwright’s request fixture.
A screenshot on failure, taken before teardown closes the browser.
Retries and flaky tests: every attempt is its own tab with its own logs, error, API calls and screenshots.
One HTML file, no server: attach it to a ticket, email it, or keep it as a CI artifact.
Install with npm i -D @acereports/playwright (or /jest, /vitest, /cucumber). Run your tests as usual, and the report is written to TestResults/AceReport_.html.
Limitations: It doesn’t see HTTP/2 calls made with the http2 module, or gRPC. Vitest is supported in Node mode only, not browser mode. Requires Node 18+, Playwright 1.40+, Jest 29+, Vitest 3+ and Cucumber.js 10+.
- 记录日期: 2026-10-19T06:56:33.012Z