delete_test_run
Permanently deletes a test run and all its execution results, attachments, and test-plan links; cannot be undone. Verifies the key first to prevent deletion of non-existent runs.
Instructions
Permanently delete a test run / test cycle together with ALL its execution results, its attachments and its test-plan links (DELETE /testrun/{key}). Cannot be undone. API v1 limitation: a test run is IMMUTABLE — there is no PUT /testrun, so it cannot be renamed, moved or have cases added/removed through the public API; its items are fixed at creation and the run status is derived from item statuses. Escape hatches: recreate_test_run_with_items (public, new key) or the internal-API tools update_test_run / add_test_cases_to_run / remove_test_cases_from_run (same key, require ZEPHYR_ALLOW_INTERNAL_API=true). So delete + create_test_run with the full desired items is the public way to change a run's name, folder or composition (the new run gets a NEW key). The DELETE itself answers 2xx for a key that never existed, was already deleted or belongs to another entity type (a TEST CASE key was reported deleted while the case stayed intact), so the key is verified FIRST with GET /testrun/{key}: an unknown key fails without deleting anything. Returns { deleted: true, key, existenceVerified: true }, or existenceVerified: false plus a note when that pre-check itself could not answer (the delete is still attempted, so success then does not prove the run existed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testRunKey | Yes | Test run (cycle) key, e.g. PROJ-R123 (PROJ-C123 on older instances) |