Skip to main content

Test Runs

A test run groups test results for a specific execution session (e.g., a CI build, a sprint, or a manual regression pass).

Endpoints

MethodPathScopeDescription
GET/api/v1/runsreadList test runs
POST/api/v1/runswriteCreate a test run
GET/api/v1/runs/{id}readGet a test run
PATCH/api/v1/runs/{id}writeUpdate a test run

List test runs

GET /api/v1/runs?project_id=clxyz123&status=COMPLETED
Authorization: Bearer qh_...

Query parameters

ParameterTypeDescription
project_idstringFilter by project
statusstringPENDING, IN_PROGRESS, COMPLETED, or SYNCED

Create a test run

POST /api/v1/runs
Authorization: Bearer qh_...
Content-Type: application/json

{
"name": "Sprint 24 regression — staging",
"project_id": "clxyz123",
"environment": "staging",
"test_case_ids": ["clcase001", "clcase002", "TC-003"]
}

Fields

FieldTypeRequiredDescription
namestringYesDisplay name for the run
project_idstringYesProject to associate with
environmentstringNoEnvironment label
test_case_idsstring[]NoPre-populate with specific test cases. Accepts cuid or code.

Update a test run

PATCH /api/v1/runs/clrun001
Authorization: Bearer qh_...
Content-Type: application/json

{
"status": "COMPLETED"
}

Updatable fields: name, environment, status

Run object schema

{
"id": "string (cuid)",
"name": "string",
"project_id": "string",
"environment": "string | null",
"status": "PENDING | IN_PROGRESS | COMPLETED | SYNCED",
"created_at": "ISO 8601 datetime",
"updated_at": "ISO 8601 datetime"
}
CI/CD shortcut

For ingesting CI results, use the /api/v1/ingest endpoint instead — it creates the run and populates all results in a single request.