Test Runs
Query test run status, fetch results and artifact URLs, cancel runs, and rerun using the SmoothDeploy API. All actions require testRuns:read.
Test runs are created by the run actions on Tests
or by schedules. Every action in this group requires testRuns:read.
Canceling a run additionally requires tests:cancel, and rerunning a run
requires tests:run. Read actions do not require an active subscription;
canceling and rerunning do. See Authentication
and Scopes.
GET actions take their inputs as query parameters; POST actions take a JSON
body. All actions require x-project-id. The branch is resolved from
x-branch-id or the project default branch. test-runs.list uses the branch
only to resolve testId; without testId or branchId it returns runs from
every branch of the project.
Run Status Lifecycle
pending → queued → running → completed
→ failed
→ quarantined
→ cancelledcompleted means every test in the run passed. Any failure of a non-quarantined test produces
failed. quarantined means every executed test was quarantined: quarantined tests still run, but their failures never fail a run. A run stays in pending while all parallels are busy; it
advances to queued once a parallel is reserved and running once the remote
runner picks it up.
List Runs
GET /v1/actions/test-runs.listScope: testRuns:read
Returns test runs for a project, with pagination.
Query Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
limit | integer | 20 | Results per page. Minimum 1, maximum 500. |
page | integer | 0 | Zero-based page index. |
status | string | - | Filter by status: pending, queued, running, completed, failed, quarantined, or cancelled. |
name | string | - | Substring filter on run name. |
testId | UUID | - | Filter to runs for this test or directory (directories expand to all descendants). |
scheduleId | UUID | - | Filter to runs triggered by this schedule. |
branchId | UUID | - | Filter to runs on this branch. |
startDate | string | - | ISO 8601 date. Include only runs created on or after this date. |
endDate | string | - | ISO 8601 date. Include only runs created on or before this date (inclusive). |
exportAll | boolean | false | Return up to 10 000 runs in one response as { data, totalCount }, without pagination. |
Response
{
"data": [
{
"id": "run-uuid",
"name": "Login flow",
"status": "completed",
"testId": "test-uuid",
"testRevisionId": "rev-uuid",
"branchId": "branch-uuid",
"testName": "Login flow",
"branchName": "main",
"scheduleType": null,
"createdAt": "2026-09-20T10:00:00.000Z",
"startedAt": "2026-09-20T10:00:05.000Z",
"completedAt": "2026-09-20T10:04:12.000Z",
"duration": 247000
}
],
"pagination": {
"page": 0,
"limit": 20,
"total": 42,
"totalPages": 3,
"hasMore": true
}
}Get Latest Run
GET /v1/actions/test-runs.get-latestScope: testRuns:read
Returns the most recent run for the given filter. Useful for dashboards and status badges.
Query Parameters
| Parameter | Type | Notes |
|---|---|---|
testId | UUID | Filter to runs for this test or directory. |
scheduleId | UUID | Filter to runs triggered by this schedule. |
branchId | UUID | Filter to runs on this branch. |
All parameters are optional.
Response
{
"data": {
"id": "run-uuid",
"name": "Login flow",
"status": "failed",
"createdAt": "2026-09-21T09:00:00.000Z"
}
}Returns { "data": null } when no run matches the filter.
Get Run Statistics
GET /v1/actions/test-runs.get-statsScope: testRuns:read
Returns aggregate pass/fail/skip counts and average duration for the given filter scope.
Query Parameters
Same as Get latest run: testId, scheduleId, branchId.
Response
{
"data": {
"totalRuns": 38,
"successRate": 89,
"avgDuration": 245000,
"lastRun": "2026-09-21T09:00:00.000Z",
"passed": 34,
"failed": 3,
"skipped": 1
}
}| Field | Notes |
|---|---|
successRate | Integer 0-100. Computed as passed / (passed + failed) * 100, rounded. |
avgDuration | Average run duration in milliseconds. 0 when no completed runs exist. |
lastRun | ISO 8601 timestamp of the most recent run. null when no runs exist. |
Get a Run
GET /v1/actions/test-runs.getScope: testRuns:read
Returns the full run record including branch and revision metadata. For
completed, failed, and quarantined runs, a report field is included inline with
summary data used to generate the email report.
Query Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
runId | UUID | yes | The run to read. |
Response
{
"data": {
"id": "run-uuid",
"name": "Login flow",
"status": "completed",
"testId": "test-uuid",
"testRevisionId": "rev-uuid",
"projectId": "proj-uuid",
"branchId": "branch-uuid",
"testName": "Login flow",
"branchName": "main",
"scheduleId": null,
"config": {
"use": { "browserName": "chromium" },
"workers": 2,
"timeout": 30000
},
"vars": { "test-uuid": {} },
"parameters": { "test-uuid": [] },
"metadata": {},
"stats": null,
"createdAt": "2026-09-20T10:00:00.000Z",
"startedAt": "2026-09-20T10:00:05.000Z",
"completedAt": "2026-09-20T10:04:12.000Z",
"cancelledAt": null,
"duration": 247000,
"report": null
}
}report is only present for completed, failed, and quarantined runs. It is null when
generation fails, and includes: status, testName, runName, runId,
duration, completedAt, branchId, branchName, scheduleName, and
runTypeInfo (with type, name, testResults, and stats). For runs in any
other status the report field is omitted.
Status Codes
| Status | Meaning |
|---|---|
200 | Run found |
404 | Run not found in this project |
Get Run Tests
GET /v1/actions/test-runs.list-testsScope: testRuns:read
Returns the list of tests that were executed (or scheduled to execute) in this run. For a single-test run this is one entry; for directory and bulk runs the full leaf-test list is returned.
Query Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
runId | UUID | yes | The run to read. |
Response
{
"data": [
{ "testId": "test-uuid-1", "testName": "Login flow" },
{ "testId": "test-uuid-2", "testName": "Checkout flow" }
]
}Get Run Results
GET /v1/actions/test-runs.get-resultsScope: testRuns:read
Returns the parsed Playwright JSON report (test-results.json) of a finished
run: the resolved config, the suites with every spec and its results, any
top-level errors, and aggregate stats.
Query Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
runId | UUID | yes | The run to read. |
Response
{
"data": {
"config": { "workers": 1, "timeout": 30000 },
"suites": [],
"errors": [],
"stats": {
"startTime": "2026-09-20T10:00:05.000Z",
"duration": 241000,
"expected": 3,
"skipped": 0,
"unexpected": 0,
"flaky": 0
}
}
}data is null when the run has not produced a results file (for example
while it is still running, or when it was canceled before starting). The
element shapes inside suites follow the Playwright JSON reporter and are not
described further here. Returns 404 if the run does not exist in this project.
Get Run Artifacts
GET /v1/actions/test-runs.get-artifactsScope: testRuns:read
Returns presigned download URLs (valid for 60 minutes) for all artifacts produced by the run. Only artifacts that already exist are returned, so the list can be empty while the run is still in progress.
Query Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
runId | UUID | yes | The run to read. |
Response
{
"data": [
{
"key": "bundle.tgz",
"label": "Test Bundle - Code and Dependencies",
"type": "archive",
"url": "https://..."
},
{
"key": "playwright-report.tar.gz",
"label": "Playwright Report Archive",
"type": "archive",
"url": "https://..."
},
{
"key": "test-results.json",
"label": "Test Results JSON Report",
"type": "json",
"url": "https://..."
},
{
"key": "test-run.log",
"label": "Test Run Log",
"type": "log",
"url": "https://..."
},
{
"key": "tests/Login flow/trace.zip",
"label": "Login flow - Trace",
"type": "trace",
"testName": "Login flow",
"size": 1048576,
"url": "https://..."
},
{
"key": "tests/Login flow/error-context.md",
"label": "Login flow - Error Context",
"type": "error-context",
"testName": "Login flow",
"size": 2048,
"url": "https://..."
}
]
}If a file was not produced (e.g. trace is off in the config), its entry is
absent from the array. Per-test artifacts (traces, images, videos) appear
alongside the run-level files and include a testName field.
Get Run Report
GET /v1/actions/test-runs.get-reportScope: testRuns:read
Returns the HTML email report for a completed or failed run as { "data": { "html": "<!DOCTYPE html>..." } }.
Query Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
runId | UUID | yes | The run to read. |
Returns 400 unless the run's status is completed, failed, or quarantined. Runs in
pending, queued, running, or cancelled status return 400.
{ "data": { "html": "<!DOCTYPE html>...", "contentType": "text/html" } }Get Run Screenshots
GET /v1/actions/test-runs.get-screenshotsScope: testRuns:read
Returns the step screenshot index of a run with presigned URLs.
Query Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
runId | UUID | yes | The run to read. |
Response
{
"data": {
"steps": [
{
"stepId": "revision-step-uuid",
"testId": "test-uuid",
"title": "Click Sign in",
"urls": { "page": "https://...", "element": null }
}
],
"failureScreenshots": { "test-uuid": true },
"failureScreenshotUrls": { "test-uuid": "https://..." }
}
}steps lists every step that has a page or element screenshot. urls.page and
urls.element are null when that screenshot does not exist. failureScreenshots
and failureScreenshotUrls are keyed by test ID. steps is empty and the
failure maps are absent or empty when the run produced no screenshot manifest.
Rerun a Run
POST /v1/actions/test-runs.rerunScope: testRuns:read and tests:run
Starts a new run of the same tests with the same configuration as an earlier
run. Pass testIds to rerun only a subset, for example the failed tests.
Requires an active subscription.
Body
| Field | Required | Notes |
|---|---|---|
runId | yes | UUID of the run to repeat. |
testIds | no | 1 to 1000 test IDs to rerun instead of every test of the original run. |
Response
The response is the same as tests.run-many:
{
"data": {
"runId": "new-run-uuid",
"status": "pending",
"totalTests": 3,
"message": "Started bulk run with 3 tests"
}
}Without testIds, the tests are the ones listed by
test-runs.list-tests. The same cooldown, parallel, and
100-test limits as the run actions apply. Returns 400 when the original run
has no tests to rerun and 404 when the run does not exist in this project.
Cancel a Run
POST /v1/actions/test-runs.cancelScope: testRuns:read and tests:cancel
Cancels a run that is in pending, queued, or running state. Returns 400 if the run is already in a
terminal state.
Body
| Field | Required | Notes |
|---|---|---|
runId | yes | UUID of the run to cancel. |
Response
{
"data": {
"success": true,
"message": "Cancelled 1 task(s)"
}
}Status Codes
| Status | Meaning |
|---|---|
200 | Cancellation succeeded (or was partially successful; check the message) |
400 | Run is already completed, failed, or canceled |
403 | Missing tests:cancel scope, or no active subscription ({ "error": "LICENSE_REQUIRED" }) |
404 | Run not found in this project |
Schedules
Use the SmoothDeploy API to list, read, trigger, enable, and disable schedules. Creating and editing schedules requires a console session.
Email Inboxes
Use the SmoothDeploy API to list email inboxes and messages, read message content, and delete messages. Inboxes are org-scoped and need only x-api-key.