Introduction
Discover Zen Reports for Playwright, its core architectural principles, key capabilities, and the anatomy of generated report artifacts.
Zen Reports for Playwright
Zen Reports for Playwright is an open-source, zero-dependency HTML reporting solution engineered specifically for modern Playwright test suites. It transforms raw test execution data into a self-contained, high-performance web dashboard equipped with real-time analytics, failure clustering, visual regression diffs, and rich media previews.
Core Product & Design Principles
The design of Zen Reports is guided by seven foundational principles:
- One-Line Integration, Zero Overhead: Registering the reporter is a single line in your Playwright configuration file. Beyond that, no configuration is required at all—the reporter operates immediately with intelligent defaults, native Node.js SQLite integration, automatic dark/light mode detection, and adaptive terminal progress tickers, without setup scripts, environment variables, or boilerplate.
- Local-First Test History: Zen Reports was created in part to solve a gap many teams hit: there is often no server-backed solution available to run tests and preserve their run history. It runs tests and stores their execution history locally, inside the project itself—so cross-run history is always at hand, even where a hosted or self-hosted reporting server is out of reach.
- Portable & Infrastructure-Free: Test reports compile into a portable, single-file HTML document with inlined datasets and zero CDN dependencies. Non-text attachments (screenshots, videos, traces) are not inlined; they are stored in local or remote storage media and referenced from the report. Local cross-run persistence is powered by an embedded SQLite database (
history.db) that lives directly alongside your codebase—no mandatory daemons, cloud accounts, or third-party storage buckets required. - Beautiful & Information-Rich by Default: The report is designed to be as much a visual experience as a data one—a polished, carefully crafted interface that surfaces a depth of information (KPIs, trends, failure clusters, and artifacts) without demanding the reader dig for it.
- Signal Over Noise: Rather than inundating engineering teams with thousands of repetitive log lines, failures are algorithmically grouped into distinct failure clusters based on stack trace signatures. Embedded DuckDB analytics evaluate cross-run flakiness, duration regressions, and suite health so teams resolve systemic issues instead of triaging symptoms.
- Zero-Context-Loss Investigation: Diagnosing failures should never require jumping between terminal windows, CI log artifacts, and external folders. Traces, inline video recordings, pan-and-zoom screenshots, and searchable standard output (
stdout/stderr) are accessible directly within unified in-modal viewers. - Ergonomic & Fast by Design: Built for rapid everyday workflows, high-frequency navigation actions offer purposeful single-key shortcuts where definitive and practical (such as
1–8for view switching,Qand/for run navigation, and?for modal assistance), paired with clean mouse-driven inspection for dense suite hierarchies.
Key Capabilities at a Glance
Zen Reports translates these principles into comprehensive tooling across the testing lifecycle:
- Eight Specialized Dashboard Views: From executive KPI summaries and cross-project parity benchmarks to granular nested suite trees, spec file density heatmaps, and long-term stability trends.
- Interactive Visual Regression Comparisons: Side-by-side (2-up), difference overlay, and interactive onion-skin opacity sliding to evaluate image snapshot regressions with precision.
- Multi-Run Switching & Deep Linking: Move seamlessly between historical test executions without page reloads, share exact report states via persisted
?runId=URLs, and copy commit SHA or branch metadata with single keystrokes. - Comprehensive Notification Center: Consolidate configuration diagnostics, execution warnings, and custom CI system notices in one scannable drawer with read-state persistence.
- Client-Side CSV Exporter: Download filtered datasets with dynamic, contextual filenames across files, run histories, flaky test rankings, and performance trends.
- Companion CLI Tooling (
zr): Launch instant local preview servers, query embedded history using standard SQL, and output concise Markdown summaries for pull request comments.
Generated Report Artifacts
Every test execution generates a completely self-contained artifact directory within your configured output folder:
zen-report/├── index.html # Full interactive dashboard with all datasets inlined├── summary.html # Standalone lightweight executive summary (optional)├── report.json # Structured machine-readable test execution results├── history.json # Embedded recent history cache (up to 50 runs)├── history.db # Embedded SQLite database containing cross-run history└── attachments/ # Test artifacts including screenshots, videos, and tracesBecause index.html inlines its datasets directly into the document structure, you can open and explore the full interactive dashboard without external web servers or network connectivity. You can view it directly by opening the file in any modern web browser or by serving it locally with npx zr show.
Next Steps
Explore the documentation following the recommended workflow:
| Objective | Recommended Guide |
|---|---|
| Get up and running in minutes | Quickstart Guide |
| Tour report views, metrics, and diagnostics | Dashboard Overview |
| Accelerate triage using keyboard navigation shortcuts | Keyboard Shortcuts |
| Customize reporter options, themes, and console output | Configuration Guide |
| Merge parallel CI test shards and post pull request summaries | Sharded CI Test Runs |
| Deploy a centralized historical server for distributed teams | Zen Server Deployment |
| Query history, analyze trends, and export metrics from CLI | CLI Reference (zr) |