Triage failure into defect
qase_triage_defectCreate a defect from a test failure by providing title, actual result, and severity. Use for triaging failed tests into actionable defects.
Instructions
Create a defect from a test failure, with the failure context written into it. Requires title, actual_result and severity — the API rejects a defect missing any of the three. Note: the API offers no way to attach existing runs or results to a defect. The runs and results seen on a defect in the UI are populated by the test runner when it reports a result as a defect, so there is nothing to pass here for that — reference the failing results inside actual_result instead, and do not expect a link to appear. For a defect unrelated to a test failure use qase_defect_upsert. Cost: one API call, about 0.5s. Triaging a whole run means one call per defect, so cluster identical failures and file one defect per distinct cause rather than one per failed test.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Project code (2-10 uppercase letters, numbers, or underscores) | |
| tags | No | Tag names, e.g. ["regression", "payments"] | |
| title | Yes | Defect title | |
| severity | Yes | Required by the API | |
| attachments | No | Attachment hashes from qase_attachment_upload | |
| description | No | Extra context beyond the observed behavior | |
| custom_field | No | Custom field values keyed by field ID, e.g. { "12": "value" } | |
| actual_result | Yes | Observed behavior. Required by the API |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| defect | No | Full defect entity | |
| defect_id | Yes | Created defect ID |