Results
Results record the outcome of executing a test case within a test run.
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/runs/{id}/results | read | List results for a run |
POST | /api/v1/runs/{id}/results | write | Bulk-upsert results into a run |
POST | /api/v1/results/{id}/attachments | write | Upload attachment for a result |
List results for a run
GET /api/v1/runs/clrun001/results
Authorization: Bearer qh_...
Returns all result rows for the run with their test case codes and statuses.
Bulk-upsert results
POST /api/v1/runs/clrun001/results
Authorization: Bearer qh_...
Content-Type: application/json
{
"results": [
{
"test_case_code": "TC-001",
"status": "PASSED",
"duration_ms": 1240,
"framework": "playwright"
},
{
"test_case_code": "TC-002",
"status": "FAILED",
"error_message": "Expected 'Welcome' but got 'Error'",
"duration_ms": 3800,
"framework": "playwright",
"bug_ticket_key": "LIN-42"
}
]
}
Existing results for the same test case in this run are updated (upsert). New results are created.
Result input fields
| Field | Type | Required | Description |
|---|---|---|---|
test_case_code | string | One of | Maps to existing test case by code |
test_case_id | string | One of | Maps to existing test case by cuid |
status | string | Yes | PASSED, FAILED, BROKEN, SKIPPED, or UNKNOWN |
comment | string | No | Free-form note |
bug_ticket_key | string | No | Bug ticket key (e.g., LIN-42) |
bug_ticket_url | string | No | Full URL of the bug ticket |
duration_ms | integer | No | Execution duration in milliseconds |
framework | string | No | Test framework label |
error_message | string | No | Short error description |
error_stack | string | No | Full stack trace |
executed_at | datetime | No | When the test ran (ISO 8601) |
Response codes
| Code | Meaning |
|---|---|
201 | All results accepted |
207 | Partial — some items rejected. Check errors[] in response body. |
Upload an attachment
curl -X POST https://your-qahub.com/api/v1/results/clresult001/attachments \
-H "Authorization: Bearer qh_..." \
-F "file=@screenshot.png"
Allowed file types: PNG, JPG, GIF, WebP, SVG, PDF, TXT, JSON, ZIP, MP4, WebM
Max size: 10 MB per file (configurable via ATTACHMENT_MAX_BYTES)
Response — 201 Created
{
"data": [
{
"id": "clattach001",
"fileName": "screenshot.png",
"mimeType": "image/png",
"size": 204800,
"createdAt": "2026-05-13T12:00:00.000Z"
}
]
}