ReferenceActions

Test attempt info

Inspect what a recorded test attempt did, look closer at individual spans, and show side-by-side replays.

Test attempt actions let you investigate recorded runs without reproducing them locally. Start with samples to find a testAttemptId, run Inspect to orient on what happened and what changed, drill into individual spans with Look closer at specific spans, and share visual proof with Show a test attempt replay.

Inspect a test attempt

Inspect a test attempt

Summarizes what a test attempt did, whether it behaved differently from how the test usually runs, and which passing reference run to compare it with.

$ npx endform@latest test-attempt inspect 3MXxT0aPITdsHkuJtnZbBoLRQog
$ npx endform@latest test-attempt inspect 3MXxT0aPITdsHkuJtnZbBoLRQog --output-directory ./tmp/traces

Downloads both the attempt's trace and the reference run's trace (including screenshots) into subdirectories named after their trace IDs.

Parameters
TEST_ATTEMPT_IDstringrequired
Test attempt ID from endform samples test-runs (found at testAttempts[].id).
--output-directorystring
Directory to download trace files and screenshots into. Defaults to the system temporary directory.
--organization-idstring
Organization ID. Inferred from your repository config or active login when omitted.

Output

Prints a structured text report with test facts and error, the behavior verdict, up to 10 differences tied to span IDs, the attempt's steps with span IDs, the reference run's steps (when failed or changed), and the local paths of the downloaded traces.

Test attempt 3MXxT0aPITdsHkuJtnZbBoLRQog: Invites > rejects a duplicate invite (tests/invites.spec.ts:12, project chromium) on branch fix-invites.
Failed after 12.3s.
Error at tests/invites.spec.ts:27: expect(locator).toBeVisible() timed out

Up to the failure, this attempt ran the steps this test usually runs.

Steps:
  08398020d9392232  Invite a member  5.2s  invites.spec.ts:14
  5c406c8ad4d13826    Click getByRole('button', { name: 'Send' })  180ms  invites.spec.ts:21
  b970cda23596ca62  Expect "toBeVisible" getByText('already')  5.0s  invites.spec.ts:27  failed

Reference run: test attempt 3MXw810enHxdefuxEy02W6zVKbZ, the passing retry of this attempt.
Steps:
  1c22a04be7719e03  Invite a member  390ms  invites.spec.ts:14
Tooltest_attempt_inspect
Example promptInspect the latest failed attempt of tests/invites.spec.ts on my branch and tell me whether it changed from how the test usually runs.

Works on any recorded run in Endform even if the branch is not checked out locally. When connected through the local CLI MCP server (endform mcp), the tool also accepts outputDirectory and downloads the attempt and reference traces to disk.

Parameters
testAttemptIdstringrequired
Test attempt ID from samples_query (testAttempts[].id).
organizationIdstring
Organization ID from organization_list. Inferred from the login when omitted. Pass it when the login can access more than one organization.
outputDirectorystring
Local MCP server only. Absolute directory to download traces into (useful when your agent prefers reading inside the workspace instead of /tmp).

Output

Returns the same text report (facts, verdict, differences, attempt steps, and reference run steps), plus an inline screenshot at the failure or first difference on hosted MCP, or downloaded trace paths on local MCP.

  1. Open a suite run in the Endform dashboard and select the test you want to investigate.
  2. Select an attempt to view its error message, step timeline, and trace.

Look closer at specific spans

Look closer at specific spans

Inspects one or more spans of a test attempt to see screenshots, overlapping network requests, navigations, backend spans, console logs, and uncaught errors.

$ npx endform@latest test-attempt step 3MXxT0aPITdsHkuJtnZbBoLRQog --span-id b970cda23596ca62
$ npx endform@latest test-attempt step 3MXxT0aPITdsHkuJtnZbBoLRQog --span-id 5c406c8ad4d13826 --span-id b970cda23596ca62

Works on any attempt, including a reference run returned by test-attempt inspect, so you can compare what happened during the same step in a passing run.

Parameters
TEST_ATTEMPT_IDstringrequired
Test attempt ID from samples test-runs or the reference run from test-attempt inspect.
--span-idstring[]required
Span ID from test-attempt inspect or an earlier step call. Repeat up to 10 times (or comma-separate) to inspect the window from the earliest start to the latest end.
--organization-idstring
Organization ID. Inferred from your repository config or active login when omitted.

Output

Prints each named span's timing, parameters, error, and nested steps; overlapping spans within a 500 ms margin (HTTP requests, route navigations, backend spans); console messages; and uncaught page errors.

Tooltest_attempt_step
Example promptLook closely at span b970cda23596ca62 in that failed attempt and check what API requests and console errors happened around it.

Pass span IDs returned by test_attempt_inspect or an earlier test_attempt_step call. Call it on the reference run's testAttemptId with that run's span IDs to compare side by side.

Parameters
testAttemptIdstringrequired
Test attempt ID to read spans from (either the failed attempt or its reference run).
spanIdsstring[]required
1 to 10 span IDs from test_attempt_inspect or an earlier test_attempt_step call.
organizationIdstring
Organization ID from organization_list. Inferred from the login when omitted. Pass it when the login can access more than one organization.

Output

Returns the named span details, overlapping network/navigation/backend spans (with a 500 ms margin), console messages and uncaught errors, plus two inline screenshots (window start and window end).

  1. Open a test attempt and select Trace.
  2. Click a step in the timeline to inspect its screenshots, network requests, and console output.

Show a test attempt replay

Show a test attempt replay

Retrieves shareable replay links that play a recorded test attempt step by step with screenshots beside its reference run, with optional highlighted steps.

$ npx endform@latest test-attempt replay 3MXxT0aPITdsHkuJtnZbBoLRQog
$ npx endform@latest test-attempt replay 3MXxT0aPITdsHkuJtnZbBoLRQog --highlight "5c406c8ad4d13826 Button no longer says Get started" --highlight "b970cda23596ca62:end Timed out waiting for banner"

Endform selects the reference run automatically using the same rules as test-attempt inspect. Without --highlight, a changed attempt marks its recorded differences and a failed attempt opens on the failing step.

Parameters
TEST_ATTEMPT_IDstringrequired
Test attempt ID from samples test-runs or test-attempt inspect.
--highlightstring[]
Quoted value in the form SPAN_ID[:start|:end] [LABEL] (caption max 120 characters; :end is the default). Repeat up to 20 times. The replay opens on the first highlight.
--organization-idstring
Organization ID. Inferred from your repository config or active login when omitted.

Output

Prints the full browser replay URL and an embeddable player URL. Links generated with a member login stay valid for 1 year (while the member remains in the organization); links generated with an organization API key stay valid for 2 hours.

Tooltest_attempt_replay
Example promptShow me a replay of that failed attempt with the step that timed out highlighted.

Renders an interactive replay view inline in MCP hosts that support MCP Apps, and always returns browser and embed URLs.

Parameters
testAttemptIdstringrequired
Test attempt ID from samples_query or test_attempt_inspect.
highlightsHighlight[]
Up to 20 moments to mark on the step ruler. Each item is { spanId, label?, at? }: label is at most 120 characters (optional or null), and at is "end" (default, the span's result) or "start" (where a missing step would have run).
organizationIdstring
Organization ID from organization_list. Inferred from the login when omitted. Pass it when the login can access more than one organization.

Output

Returns an interactive MCP App replay view plus JSON with url (full viewer), embedUrl (player only), reference (when a reference run exists), and highlights.

{
  "url": "https://endform.dev/app/replay?...",
  "embedUrl": "https://endform.dev/app/replay?embed=1&...",
  "reference": {
    "testAttemptId": "3MXw810enHxdefuxEy02W6zVKbZ",
    "label": "Passing retry"
  },
  "highlights": [
    { "spanId": "b970cda23596ca62", "label": "Timed out waiting for banner", "at": "end" }
  ]
}
  1. Open a test attempt in the Endform dashboard and select Replay.
  2. Scrub through the step timeline or play the recorded screenshots step by step.

How Endform compares attempts and picks a reference run

Every recorded attempt is compared against the test's established behavior model while it runs.

  • Verdict and differences: Inspect reports one verdict (behaved as usual, changed, or why no comparison was possible). When an attempt changed, Endform lists up to 10 differences anchored to step span IDs. Missing steps are anchored as before <spanId>.
  • Reference run selection: When an attempt failed or changed and has an established reference variant, Endform picks the newest qualifying passing run of that comparison variant that has a trace, in this priority order:
    1. For failed attempts only, a passing retry in the same test run.
    2. An earlier passing CI run on the default branch in the same Playwright project (within 7 days before the inspected attempt).
    3. An earlier passing CI run on the default branch in any project (within 7 days before the inspected attempt).
    4. An earlier passing CI run on another branch (excluding the attempt's own branch) in the same project (within 7 days before the inspected attempt).
    5. An earlier passing CI run on another branch in any project (within 7 days before the inspected attempt).
  • Local CLI vs. hosted MCP: Both servers return the same text report, step lists, and span IDs. Hosted MCP returns screenshots inline so an agent can inspect attempts without filesystem access. The CLI (endform test-attempt inspect and endform mcp) also downloads the attempt and reference traces with their screenshots to disk.
  • Highlight syntax for replays: When marking steps in test-attempt replay, mark a failing or changed step at its end (the default) to show its result, and mark a missing step at the start of the span it sits before.

Last updated