Skip to main content

Results

Results record the outcome of executing a test case within a test run.

Endpoints

MethodPathScopeDescription
GET/api/v1/runs/{id}/resultsreadList results for a run
POST/api/v1/runs/{id}/resultswriteBulk-upsert results into a run
POST/api/v1/results/{id}/attachmentswriteUpload 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

FieldTypeRequiredDescription
test_case_codestringOne ofMaps to existing test case by code
test_case_idstringOne ofMaps to existing test case by cuid
statusstringYesPASSED, FAILED, BROKEN, SKIPPED, or UNKNOWN
commentstringNoFree-form note
bug_ticket_keystringNoBug ticket key (e.g., LIN-42)
bug_ticket_urlstringNoFull URL of the bug ticket
duration_msintegerNoExecution duration in milliseconds
frameworkstringNoTest framework label
error_messagestringNoShort error description
error_stackstringNoFull stack trace
executed_atdatetimeNoWhen the test ran (ISO 8601)

Response codes

CodeMeaning
201All results accepted
207Partial — 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)

Response201 Created

{
"data": [
{
"id": "clattach001",
"fileName": "screenshot.png",
"mimeType": "image/png",
"size": 204800,
"createdAt": "2026-05-13T12:00:00.000Z"
}
]
}