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 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 the recording follows the pages the test opens:
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.

With tester-army/e2e

tester-army/e2e runs its web engine on Playwright and can attach to a browser you name. The same wrap works, with the endpoint set in the config:
e2e.config.ts
For one Jam per test attempt instead, so every failed attempt has its own recording, give the engine a BrowserProvider whose acquire starts jam record start --cdp on a fresh Chrome and returns the proxy as the endpoint, and whose record().stop runs jam record stop. Pass --marks to stop with one line per test step, and each step lands on the Jam as a comment.

Next