GuidesVisual test understanding
Replays
Inspect passing runs, automatic side-by-side failure diffs, and passed-but-changed behavior with interactive browser replays.
When an end-to-end test fails or changes on a pull request, a stack trace only tells you which line threw an error. It does not show what was on screen, what the user clicked just before, or how the run differed from yesterday on main.
Endform records a visual, step-synchronized replay for every test attempt automatically. Every replay plays back browser screenshots alongside Playwright steps, click and fill overlays, network activity, console output, and correlated backend spans.
See what a test actually did
Replays are useful on passing tests too, especially when you are reviewing a new spec, onboarding to a codebase, or verifying what a test covers without reading every locator.
The player shows each browser frame paired with the Playwright step running at that moment, with visual markers where the test clicked or filled inputs. You can play and pause (Space), step through frames (← and →), jump to the start or end (Home and End), adjust playback speed, switch between browser tabs in multi-page tests, and move across retry attempts.
Here is a live passing replay from BikeBook (suites/01-base-setup in endformdev/playwright-guides):
- Sign up: Creates a new BikeBook account through the UI.
- Add a bike: Opens Manage fleet and adds Road 1 to the office fleet.
- Book it: Books Road 1 for the morning slot and confirms the booking appears on screen.
Automatic side-by-side failure comparison
Debugging a failure from a single screenshot forces you to guess what the page normally looks like. When a test fails and Endform has a recent passing run matching its established behavior, the replay pairs the failing attempt side by side against that passing reference run automatically.
Scrubbing the timeline moves both runs together step by step so you can see the exact moment the two browsers diverge. When one run takes extra steps or stops early, the viewer notes unmatched or approximate frames instead of drifting out of sync.
Here is a live failure replay from BikeBook's PR #4 (demo/checkout-regression), paired automatically beside the latest passing run on main:
- Before the click: Both runs navigate to
/pricing, choose the Base plan, and fill out the checkout form identically. - Divergence: On PR #4, clicking Complete Purchase sends a checkout request that fails with
500becauseprocessPaymentlooks up lowercase plan names while the form submits capitalized names. - Result: The
mainrun redirects to/dashboard/team?payment=success, while PR #4 drops onto a Next.js error screen and times out waiting for the URL.
Once a test has an established behavioral model, Endform looks for a recent passing CI attempt of that same behavior within the last 7 days, in priority order:
- A passing retry from the same test run (useful when a test flaked on attempt 1 and passed on attempt 2).
- The latest passing run on your default branch, preferring the same Playwright project first.
- The latest passing run on another branch (never the failing attempt's own branch).
Catching changes even when tests pass
A green check does not always mean behavior stayed the same. When a pull request updates both the application and the end-to-end test together, every assertion passes. Reviewers still need to confirm the product change looks right and verify that a test was not weakened by accident.
After 3 passing runs on your default branch (or across distinct branches), Endform establishes a behavioral model of how a test normally runs. The model ignores setup hooks and fixtures, collapses loops, normalizes generated values like timestamps and UUIDs, and redacts sensitive inputs so normal run-to-run variation does not create noise.
When a later attempt adds, removes, or changes steps compared to that baseline, Endform flags the differences even when the test passes. Opening the replay automatically pairs the attempt beside its reference run and pins up to 20 captioned highlights onto the timeline ruler, opening directly on the first changed moment.
Here is a live passed-but-changed replay from BikeBook's PR #3 (demo/pricing-flow-change), where the test passes because the PR updates the app and the spec together:
- Navigate to sign-up: The redirect link changes from
plan=Plus&amount=1200toplan=Pro&amount=1500. - Return to checkout: After sign-up, the expected checkout URL changes to
/pricing/checkout?plan=Pro&amount=1500. - Verify plan summary: The checkout page displays
You are purchasing: Pro($15) instead ofYou are purchasing: Plus($12).
Going deeper in the full viewer and with coding agents
The embedded player is built for fast visual review. When you need the full picture behind a frame, click Open full replay on any replay to open the three-lane OpenTelemetry timeline:
- Test steps: Nested Playwright actions, assertions, and custom
test.stepblocks with exact durations and source locations. - Browser activity: Network requests with status codes, page and route navigations, console messages, and uncaught page errors aligned to the same clock.
- Backend spans: Server and external service spans correlated onto the test trace when your application propagates standard W3C
traceparentheaders.
The full viewer also includes step search, an error-spans jump menu, filmstrip scrubbing, and a Details panel for inspecting attributes and errors on any span. If you also enable Playwright's native use.trace, Endform stores the raw Playwright trace ZIP and keeps it one click away in the dashboard toolbar.
Highlighted replays from coding agents and the CLI
Coding agents can read the same step tree, inspect specific spans without downloading the full trace, and hand back a shareable replay link pinned to the exact moments worth reviewing:
test_attempt_inspect(endform test-attempt inspect): Returns the step tree with span IDs, any differences against the test's baseline model, and the reference run onmain.test_attempt_step(endform test-attempt step): Zooms into 1 to 10 spans and returns start and end screenshots, overlapping network requests, backend spans, console messages, and errors.test_attempt_replay(endform test-attempt replay): Generates shareable links to the full replay and embeddable player, automatically paired beside the reference run, with up to 20 custom captioned highlights. In MCP hosts that support embedded views, the player renders inline right in the conversation.
Replay links work without a login, so anyone reviewing a pull request or issue can open them immediately. Links created by an organization member remain valid while that member stays in the organization (up to a year); links created with an API key expire after 2 hours.
Switch between MCP and CLI below to see how an agent investigates the PR #4 checkout failure and sends back a highlighted replay:
I'll inspect the failing checkout attempt, pull the network requests and screenshots around clicking Complete Purchase, and build a highlighted replay beside main.
test_attempt_inspect{
"testAttemptId": "<testAttemptId>"
}test_attempt_step{
"testAttemptId": "<testAttemptId>",
"spanIds": [
"b8db79556d6bd612",
"1fa989cc68066c3d"
]
}test_attempt_replay{
"testAttemptId": "<testAttemptId>",
"highlights": [
{
"spanId": "b8db79556d6bd612",
"at": "end",
"label": "POST /pricing/checkout returns 500"
},
{
"spanId": "1fa989cc68066c3d",
"at": "end",
"label": "Error screen instead of redirect"
}
]
}Clicking Complete Purchase sends POST /pricing/checkout?plan=Base&amount=800, which returns 500 and drops the page into a Next.js error boundary instead of redirecting to /dashboard/team?payment=success. Your replay is ready beside the passing main run, opening directly on those two highlighted moments.
npx endform@latest npx endform@latest npx endform@latest Hover or click any highlighted flag to see what it does.
Here is what that highlighted replay looks like on the PR #4 checkout failure, paired beside main with both captions pinned on the timeline ruler:
- Click Complete Purchase: Highlights the step where
POST /pricing/checkoutreturns500. - Expect
toHaveURL: Highlights the resulting Next.js error screen beside the passing Team billing page onmain.
How replays compare to Playwright traces and video
Endform replays sit alongside Playwright's built-in artifacts rather than replacing them. If you need live DOM snapshot inspection on a specific failure, you can still turn on Playwright's use.trace and open the trace ZIP directly from Endform.
| Capability | Endform Replays | Playwright Trace Viewer | Video recording |
|---|---|---|---|
| Overhead and storage | Lightweight capture (screenshots and OpenTelemetry spans only) and compact storage, avoiding the DOM-snapshotting overhead of full Playwright traces so it can run on every attempt | Higher runtime overhead and much larger trace files because capturing DOM snapshots before and after each step slows tests down; typically kept for retries or failures | Continuous video encoding adds browser CPU overhead and larger .webm files without step metadata |
| Side-by-side comparison | Automatic step-synced pairing against a recent passing run | Single attempt per trace file | Single recording per file |
| Behavioral change highlights | Flags added, missing, and changed steps even on passing runs | Not built in | Not built in |
| Step, network, and backend sync | Test steps, browser requests, console, and W3C traceparent backend spans on one timeline | Test steps, network, console, and full DOM snapshots | Visual playback only |
| Sharing and coding agents | Shareable no-login links with up to 20 captioned highlights and MCP inline player | Download and open .zip artifact locally or via hosted viewer | Download .webm file |
| Best suited for | Daily PR review, failure triage, spotting behavior drift, and agent handoffs | Inspecting exact DOM structure, CSS, and locator resolution on a single run | Lightweight visual proof when no step metadata is needed |
Next steps
Pair automatic failure replays with main pass-rate history to triage red pull requests in seconds.
Get your first Playwright test running on Endform with automatic replays on every pull request.
The no-flake strategyCombine stored run history, weekly flake fixes, and on-demand triage to keep your suite near 99.9%.
Last updated