Attachments & Preview
Test attachments — screenshots, videos, traces, and logs — persisted to disk and inspected in the Universal Preview modal.
During test execution, Zen Reports for Playwright extracts every attachment Playwright produces — screenshots, videos, trace files, and stdout/stderr output — and persists it under <outputDir>/attachments/ in your report bundle. Attachments are then inspectable directly in the dashboard through the Universal Preview modal, without leaving the report.

Where Attachments Appear
- Test case detail: clickable attachment thumbnails and items inside the expanded test case detail open the preview modal.
- Standard output:
stdoutandstderrblocks in the test case detail are clickable line-by-line and open in the same modal. - Failures tab: expanded failures show the same attachments and output (without the execution steps section).
Universal Preview Modal
One modal handles every attachment type:
| Type | What the preview shows |
|---|---|
| Screenshots & images | Full-size image view with zoom and pan — click to enlarge; the lightbox also supports wheel zoom and panning. |
| Text (logs, stdout/stderr, JSON) | Rendered text with an inline filter search (F focuses the search bar) for grepping long logs. |
| Video | Inline playback of test video recordings. |
| Binary / other files | File metadata (name, size, type) with a download action. |




Keyboard Navigation
Inside the modal, when a test case has multiple artifacts:
| Shortcut | Action |
|---|---|
P or ← |
View the previous attachment in the artifact carousel. |
N or → |
View the next attachment in the artifact carousel. |
F |
Focus the inline filter search bar (text artifacts and logs). |
Esc |
Blur the search input if focused; close the previewer on the next press. |
The full list lives in the Keyboard Shortcuts Guide.
Storage Notes
- Attachments live on disk under
<outputDir>/attachments/; the report records their relative paths (in SQLite history and the report JSON), and the dashboard resolves them from disk or fetches them on demand. - Migrating legacy history (see History Migration) does not move attachment binaries — only their references — so the
attachments/folder should be kept alongsidehistory.db. zr history cleanremoves orphaned attachments from disk when runs are purged (see CLI Reference).