Test Runs & Results
Execute generated tests, inspect results, access artifacts, and manage self-healing suggestions.
Test Runs
| Method | Path | What it does |
|---|---|---|
| POST | /test-run/{test_case_id} | Submit a run for a test case |
| GET | /test-run/{test_run_id} | Get a single run (full detail: steps, errors, artifacts) |
| GET | /test-cases/{test_case_id}/runs | Filtered, paginated run history |
| GET | /test-runs/{test_case_id} | List all runs for a test case |
| DELETE | /test-run/cancel/{test_run_id} | Cancel a queued run |
| DELETE | /test-run/delete/{test_run_id} | Delete a run record |
| GET | /images/run/{test_run_id}/{image_id} | Fetch a screenshot from a run |
| GET | /artifacts/{test_run_id} | Download a run artifact (video, trace — artifact_name query) |
Run settings
POST /test-run/{test_case_id} accepts an optional RunSettings body to override execution context:
| Field | Description |
|---|---|
platform | fore_ai (default) or lambda_test |
browser_type_override | chromium, firefox, webkit, or msedge |
viewport_width_override / viewport_height_override | Browser viewport dimensions |
website_url_override | Override the base URL (useful for staging environments) |
parameter_overrides | Key/value overrides for test parameters |
proxy_id_override / disable_proxy | Proxy routing overrides |
user_agent_override | Custom user-agent string |
accept_language_override | Language header override |
geolocation_override | { "latitude": 47.38, "longitude": 8.54 } |
mobile_app_asset_id_override | Override the mobile app binary |
Set platform to lambda_test (and configure LambdaTest credentials via PUT /customer/settings) to route runs through LambdaTest infrastructure instead of fore ai's default runners.
Example — submit and retrieve a run
# Trigger a run
curl -X POST "https://cj-backend.foreai.co/test-run/<test_case_id>" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"website_url_override": "https://staging.example.com"}'
"3f2504e0-4f89-11d3-9a0c-0305e82c3301"
# Fetch results
curl "https://cj-backend.foreai.co/test-run/3f2504e0-4f89-11d3-9a0c-0305e82c3301" \
-H "Authorization: Bearer <token>"
{
"_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"test_case_id": "ddfa83cd-b43d-4b68-8931-42684931f58d",
"status": "failed",
"created_at": "2026-06-09T10:32:00Z",
"execution_time_in_secs": 12.4,
"failing_step_index": 2,
"user_friendly_error": "Could not find the Sign in button",
"artifacts": ["recording.webm"],
"steps": [...]
}
TestRun response fields
| Field | Type | Description |
|---|---|---|
_id | UUID | Run ID |
test_case_id | UUID | |
status | TestRunStatus | |
created_at / run_at | datetime | Queued timestamp vs actual start time |
execution_time_in_secs | number | |
failing_step_index | integer | 0-based index of the first failed step |
error_message | string | Raw error text |
user_friendly_error | string | Human-readable error description |
artifacts | string[] | Artifact filenames — download via GET /artifacts/{run_id}?artifact_name=<name> |
steps | TestRunStep[] | Per-step execution snapshots |
TestRunStep fields
| Field | Type | Description |
|---|---|---|
action_name | string | Step name |
step_description | string | What the step does |
success | boolean | null | null if not yet executed |
screenshot_id | string | Fetch via GET /images/run/{run_id}/{screenshot_id} |
run_code | string | The Playwright code executed for this step |
Filtering runs
GET /test-cases/{test_case_id}/runs accepts:
| Parameter | Description |
|---|---|
run_status | One or more TestRunStatus values (repeat parameter for multiple) |
created_at_range_start / created_at_range_end | ISO 8601 datetime bounds |
run_id | Fetch a single specific run |
offset | Pagination offset (default 0) |
limit | Results per page (default 50, max 1000) |
For ready-made CI/CD integrations (GitHub Actions, GitLab, Jenkins, Tekton, Azure DevOps), see CI/CD integrations.
Healing
Self-repair for tests broken by UI changes.
| Method | Path | What it does |
|---|---|---|
| POST | /healing/test-case/{test_case_id} | Create a healing suggestion for a failing test |
| GET | /healing/test-case/{test_case_id} | Get the current healing suggestion |
| GET | /healing/test-run/{test_run_id} | Get healing tied to a specific run |
| GET | /healing/{test_healing_id}/diff | View the diff between the original and healed test (per-step: unchanged, modified, added, removed) |
| POST | /healing/{test_healing_id}/approve | Approve or reject a healing (approved query); approving replaces the original steps with the healed ones |
Output Artifacts & Logs
Access screenshots, recordings, and logs produced during test generation and test runs.
| Method | Path | What it does |
|---|---|---|
| GET | /output_artifacts/test_runs/{test_run_id} | List all artifacts from a run (videos, traces) |
| GET | /output_artifacts/test_cases/{test_case_id} | List artifacts from test generation |
| GET | /images/{test_case_id}/{image_id} | Fetch a screenshot captured during generation |
| GET | /logs/{test_case_id} | Fetch generation logs |