Attachments, Traces & Logs
Test reporters capture files produced during test execution — screenshots, videos, trace files, terminal output, and any other artifacts — and include them in the Flakiness report. The Report Viewer displays these inline alongside test results.
Screenshots
Section titled “Screenshots”Images are displayed inline with the test result. When multiple screenshots are present, they are laid out in a flex-wrapped gallery.
Image Diffs
Section titled “Image Diffs”When a visual comparison test fails, reporters typically produce three images: expected,
actual, and diff. The Report Viewer auto-detects these by naming convention
(name-expected.png, name-actual.png, name-diff.png) and presents them in a tabbed
interface with four views:
- Diff — the computed difference image
- Actual — what the test produced
- Expected — the baseline reference
- Slider — an interactive image comparer that lets you drag between actual and expected
Videos
Section titled “Videos”Video attachments render as inline <video> elements with playback controls.
Playwright Traces
Section titled “Playwright Traces”Playwright traces receive special treatment.
When the @flakiness/playwright reporter captures a trace file, the Report Viewer displays
it with a dedicated thumbnail and a link that opens the trace in the
Playwright Trace Viewer — giving you a full timeline of
actions, network requests, DOM snapshots, and console logs for that test.
Traces are automatically detected when an attachment has the name trace.
Terminal Logs
Section titled “Terminal Logs”Reporters capture stdout and stderr output during test execution. Each test run shows its terminal output in a dedicated section with log entries displayed in chronological order.
Stderr entries are highlighted with a red background to make them visually distinct.
ANSI escape sequences are rendered as styled text — colors, bold, and other formatting match what you’d see in your terminal.
Miscellaneous Files
Section titled “Miscellaneous Files”Any other attachment type (logs, JSON files, data exports) is shown as a downloadable link.