Skip to content

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.

Images are displayed inline with the test result. When multiple screenshots are present, they are laid out in a flex-wrapped gallery.

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

Video attachments render as inline <video> elements with playback controls.

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.

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.

Any other attachment type (logs, JSON files, data exports) is shown as a downloadable link.