#42755·Playwright

[CLI]: Generate an offline HTML report from a CLI session (trace + video + screenshot)

Author: Akshay090Created Sep 17, 2026Updated Sep 17, 2026

What's going on?

Feature request: Playwright CLI can record traces and video, but it has no command to wrap a session into a self-contained offline HTML report (the Playwright Test HTML reporter UI with Trace / Videos / screenshot attachments).

What we ran (@playwright/[email protected]):

  • playwright-cli --help has tracing-start / tracing-stop, video-start / video-stop, and show
  • There is no html-report, show-report, or similar
  • tracing-stop --help and video-stop --help only stop recording; they do not emit a report
  • show --help is the live session dashboard (--port / --host / --annotate), not an offline report

What the docs point to:

What we expected: Something like playwright-cli report (or tracing-stop --html) that writes a Test-style HTML report from the current CLI session: trace zip (including screencast JPEGs), video, screenshot, then a local show-report page we can keep after the browser/daemon is gone.

What we do today (workaround):

  1. tracing-start before navigating (CLI video-start letterboxes if tracing already owns the screencast)
  2. Zip the whole traces dir, including screencast/*.jpeg
  3. Rebuild session.webm from those JPEGs (Playwright ffmpeg often has no image2 glob demuxer)
  4. Create a throwaway @playwright/test project, attach trace.zip / session.webm / screenshot on a dummy test, run it with the HTML reporter
  5. npx playwright show-report

That works, but it is a Test-runner hack for a CLI session. Coding agents want one offline page to hand a human after a verify, without spinning up a dummy test project or keeping the CLI daemon alive.

Not requesting:

  • Replacing Trace Viewer (show-trace)
  • Changing the live playwright-cli show dashboard

Version

@playwright/[email protected]