ReferenceActions
Samples
Query individual suite runs and test runs with their errors, persisted IDs and ordered test attempts, to see what happened in specific Playwright executions.
Samples return concrete suite-run or test-run records matching your filters, ordered newest first. Use analytics to spot a trend, then query samples to read errors and retrieve exact suite.id, test.id, and testAttempts[].id values for test attempt info and quarantine.
Query run samples
Query run samples
Returns concrete matching suite-run or test-run records, including persisted suite/test IDs and chronological test attempts with errors.
$ npx endform@latest samples test-runs --where 'testRun.outcome = fail' --limit 10$ npx endform@latest samples test-runs --where 'testRun.testAttemptsCount > 1' --period 30D --limit 25$ npx endform@latest samples suite-runs --cursor '<nextCursor>'DATASET"suite-runs" | "test-runs"required- Positional dataset:
suite-runsfor complete runs ortest-runsfor individual tests and their attempts. --wherestring- Comma-separated filter expression, such as
suiteRun.id = sr_123, testRun.outcome = fail. See Filter syntax below. --periodstring- Lookback window (
H,D,W, orM). Defaults to7D. Cannot start more than 60 days ago. --ending-atstring- ISO 8601 timestamp at which the period ends. Defaults to the current time.
--limitnumber- Newest records to return (1 to 50). Defaults to
10. --cursorstring- Opaque pagination token from
nextCursor. Preserves the original query's time window; pass the same dataset and--wherefilter on the next request. --organization-idstring- Organization ID. Inferred from your repository config or active login when omitted.
Output
Prints JSON with dataset, samples, and nextCursor (plus organizationHasRuns when no records match). Each test-runs sample contains suite.id, test.id, and ordered testAttempts whose id feeds into test-attempt inspect.
{
"dataset": "test-runs",
"nextCursor": "eyJzdGFydGVkQXQiOi...",
"samples": [
{
"branch": "main",
"commitSha": "a1b2c3d",
"suite": { "id": "suite_01J...", "repository": "org/app", "directory": "e2e" },
"suiteRun": { "id": "sr_01J...", "outcome": "fail", "durationSeconds": 42.1, "maxTestAttemptsCount": 2 },
"test": { "id": "test_01J...", "name": "completes booking", "location": "tests/checkout.spec.ts", "describes": "Checkout" },
"testRun": { "id": "tr_01J...", "outcome": "pass", "projectName": "chromium", "testAttemptsCount": 2, "startedAt": "2026-11-27T10:00:00.000Z", "durationSeconds": 18.4 },
"testAttempts": [
{ "id": "ta_01J...", "outcome": "fail", "startedAt": "2026-11-27T10:00:00.000Z", "durationSeconds": 12.3, "errorMessage": "Timed out", "errorLocation": "tests/checkout.spec.ts:72", "otelTraceId": "18eaef..." },
{ "id": "ta_02J...", "outcome": "pass", "startedAt": "2026-11-27T10:00:13.000Z", "durationSeconds": 6.1, "errorMessage": null, "errorLocation": null, "otelTraceId": "18eaee..." }
]
}
]
}samples_queryExample promptFind the most recent failing test runs on branch feat/checkout so we can inspect their attempts.
Use samples_query to obtain exact suite.id, test.id, and testAttempts[].id values needed by the quarantine and test-attempt tools.
organizationIdstringrequired- Organization ID from
organization_list. Hosted logins with a single organization do not see this argument. dataset"suite-runs" | "test-runs"required- Whether to return suite-level or individual test-run records.
wherestring- Optional filter expression. See Filter syntax below.
periodstring- Positive integer followed by
H,D,W, orM. Defaults to7D(max 60 days lookback). endingAtstring- Optional ISO 8601 timestamp where the period ends. Defaults to request time.
limitnumber- Number of newest records to return (1 to 50). Defaults to
10. cursorstring- Opaque cursor from
nextCursorto fetch the next page. Preserves the time window; pass the samedatasetandwherefilter on the next call.
Output
Returns JSON with dataset, samples, and nextCursor (plus organizationHasRuns when no records match).
- Open Suites in the Endform dashboard and select a suite.
- Filter suite runs by branch or outcome, then open a run to browse its test runs and attempts.
Pagination and retention
- Page size:
limitdefaults to10and accepts up to50records per call. - Cursors: When more records match, the response includes
nextCursor. Pass it as--cursor(cursor) to fetch the next page; the cursor preserves the original query's time window, while you still pass the same dataset and any--where(where) filter on each paginated request. - Lookback limit: A samples period cannot start more than 60 days before the request time.
- Empty results: When no records match, responses include
organizationHasRuns: trueif the organization has recorded runs that do not match the filter, orfalseif the organization has not run tests on Endform yet.
Filter syntax
Pass comma-separated key operator value clauses to --where (where). Quote values that contain spaces, commas, or pipes (|). Separate multiple values for in and !in with |.
suite.repository = endformdev/endform, testRun.outcome = failFilter keys
- Suite-run keys (available on both
suite-runsandtest-runs):branch,commitSha,suite.id,suite.repository,suite.directory,suiteRun.id,suiteRun.outcome,suiteRun.durationSeconds,suiteRun.maxTestAttemptsCount. - Test-run keys (available on
test-runsin addition to suite-run keys):test.id,test.name,test.location,test.describes,testRun.id,testRun.outcome,testRun.projectName,testRun.testAttemptsCount,testRun.durationSeconds,testAttempt.id,testAttempt.outcome,testAttempt.errorMessage,testAttempt.errorLocation,testAttempt.durationSeconds.
Operators and value types
| Type | Operators | Notes |
|---|---|---|
| String | =, !=, ^= (prefix), $= (suffix), ~= (contains), !~= (does not contain) | Selected fields also support in and !in with |-separated values. |
| Number | =, !=, >, >=, <, <= | Durations are in seconds. Selected fields also support in and !in. |
- Outcomes:
passorfail(test runs and attempts can also reportskipin responses). - Attempt matching: On
test-runs, atestAttempt.*filter matches a test run whenever any of its attempts satisfies the clause, while the response still includes every attempt intestAttemptsin chronological order.
Last updated