.e2e/report.json. Attempt artifacts depend on the selected
engine and what it captured: screenshots, Playwright traces, downloads, or
recordings. The terminal tells you what failed; the report and the available
artifacts tell you why.
Read the failure
Thelist reporter ends with a Failed Tests section: the error code, the
message, the failing line, and a code frame. The exit code says which side
failed:
The report has everything the terminal showed and more:
run.errors first: a run-level error such as APP_UNREACHABLE means no
test result is meaningful. Then the error of the last attempt of each
failed result, and the artifacts beside it. steps shows how far the test
got. --reporter json prints the same document on stdout.
Artifacts
Artifacts land under.e2e/artifacts/, one directory per attempt:
- Screenshots. The built-in
agent.asserttries to capture one after either verdict unlessscreenshot: falsedisables it. Capture can fail or be withheld. A failedexpectdoes not capture one automatically;app.screenshot('label')captures one explicitly when pixels are allowed. - Playwright traces when the
traceartifact kind is enabled and capture succeeds. Open a trace withnpx playwright show-trace <file>. - Downloads a test saved through
web.waitForDownload. - Videos and agent transcripts when you ask for them; see below.
<secret:name>. The
report marks a successfully rewritten trace redaction: "complete", but
that does not mean its pixels were redacted. Trace image resources are kept
unless they contain literal secret bytes; a secret rendered into a
screenshot frame can remain visible.
A trace inside the attempt’s artifact directory that cannot be rewritten is
deleted. If an engine returns a path outside that directory, the runner
withholds the trace with TRACE_WITHHELD and leaves the file untouched.
Screenshots requested by agent calls and app.screenshot() are denied for
the rest of the attempt after a secret fill. That restriction does not stop
the screenshot frames captured inside a Playwright trace.
Videos are recorded with redaction: "incomplete" because a screencast masks
nothing.
Watch it happen
--video requires recording support from every selected engine; an engine
without it fails configuration with UNSUPPORTED_ARTIFACT. Playwright writes
WebM segments under the attempt’s directory, one per page it records. A
restart or state reset can produce several segments. The agent-device engine
writes an MP4 of the device screen. The failure recap names the files under
each failed test. Set
artifacts: { kinds: ['video'], video: { retain: 'on-failure' } }
in the config to record attempts in CI and keep only recordings from failures.
Agent steps
Three flags look inside an agent step:--debug appends two tables after the reporter’s output: phase timings for
the run, and one row per agent step with its duration, model calls, tokens,
prompt-cache share, and cost when the provider reports one. Every planned
step also saves its full model transcript as an artifact.
--ai-trace writes .e2e/ai-trace.json next to the report, in the AI SDK
devtools shape. Open it with unbox-ai
to see which tokens went to the system prompt, the tool definitions, or a
screen snapshot:
--ai-trace
with --no-cache for a complete picture.
--no-cache is the first thing to try when a step that passed yesterday
fails today. A recording made against one page state can replay against a
changed one; see Caching agent steps.
Common errors
Every code, its class, and its exit code are in the
errors reference.
CLI reference
Every flag of
e2e run.Errors
Every error code.
