create_test_run
Create a Zephyr Scale test run (test cycle) with a fixed set of test cases and optional execution results. The run composition is immutable after creation, so provide all items at once.
Instructions
Create a Zephyr Scale test run (test cycle; key like PROJ-R123). IMPORTANT API v1 limitation: a test run is IMMUTABLE after creation — there is no PUT /testrun/{key}. A run cannot be renamed, moved to another folder, and test cases cannot be added to or removed from it later; the set of items is fixed ONLY at creation time. The run status is computed automatically from the statuses of its items and cannot be set directly. Therefore pass the COMPLETE list of test cases in items now — each item may also carry full execution result fields (status, executedBy, executionTime, actualStartDate/actualEndDate, per-step scriptResults, etc.), which allows importing a run together with its results in a single call. To record or update executions of the included items afterwards, use the test result tools. Item/result statuses default to 'Not Executed', 'In Progress', 'Pass', 'Fail', 'Blocked' (case-sensitive; instances may define custom ones).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Test run name (cannot be changed after creation) | |
| items | No | Test cases to include in the run — this is the ONLY place where the run composition can be set. Each item requires testCaseKey and may carry full execution result fields (status, environment, executedBy, assignedTo, comment, executionTime, actualStartDate, actualEndDate, customFields, issueLinks, scriptResults). | |
| owner | No | Owner. Jira *user key* (e.g. 'JIRAUSER10000'), NOT a username or e-mail — resolve it with find_jira_user. | |
| folder | No | Full path of a TEST_RUN folder starting with "/", e.g. "/Regression". The folder MUST already exist (create it with create_folder, type TEST_RUN); it is not created automatically. | |
| version | No | ||
| iteration | No | ||
| issueLinks | No | Jira issue keys to link, e.g. ["PROJ-123"] | |
| projectKey | No | Jira project key; defaults to ZEPHYR_DEFAULT_PROJECT_KEY | |
| testPlanKey | No | Key of the test plan to associate the run with, e.g. PROJ-P123 | |
| customFields | No | Custom field values keyed by field name | |
| plannedEndDate | No | ISO 8601 (passed through as-is) | |
| plannedStartDate | No | ISO 8601, e.g. 2026-07-20T00:00:00Z (passed through as-is) |