Skip to main content
A failed end-to-end test in CI usually leaves a stack trace and a guess. A Jam leaves the video, with the run’s console logs and network requests on the same timeline. Reviewers watch the failure instead of rerunning it. Pick one of two approaches:
CI needs a personal access token in the JAM_TOKEN environment variable. The CLI never writes it to disk.

Upload a failed Playwright test

Playwright already saves a video and a trace for failed tests. jam create jam reads both. The Jam plays the video with the console and network from the trace, and shows what the test typed with sensitive fields masked.
1

Keep the video and trace for failed tests

In playwright.config.ts:
2

Install the CLI in your CI job

3

Upload each failure after the tests

Run this when the test step fails:
Playwright writes each failed test into its own folder under test-results/, so the loop creates one Jam per failure, titled with the folder name. jq builds the payload, and jam create jam reads it from stdin. Install jq first if your runner does not have it.
4

Post the link

Each jam create jam prints a Jam’s url. Post the links where your team reviews the run, such as the pull request.

Record tests live

jam record run records a browser while your test command runs. With --cdp, the video, console, and network come from the browser itself, so a headless browser on a CI runner records too.
1

Start Chrome with a debug port

The loop waits until Chrome accepts connections, so the recording does not start too early.
2

Wrap the tests in jam record run

The wrapped command gets the recorder’s address in JAM_CDP_PROXY. Connect your test to it so its clicks and typing show up as user actions in the Jam:
The command keeps the test’s exit code, so a failing test still fails the job and still leaves a Jam. Recording a browser page needs ffmpeg on the runner.

Next