create_test_case
Creates a test case in Zephyr Scale, returning its key and URL. Accepts required name and optional folder, status, priority, owner, test script, and parameters.
Instructions
Create a Zephyr Scale test case (POST /testcase). Returns { key, url } with a key like PROJ-T123. Constraints: the folder, if given, MUST already exist — the API never creates folders (use create_folder first); status and priority are case-sensitive internal names (defaults 'Draft'/'Approved'/'Deprecated' and 'High'/'Normal'/'Low'; instances may define custom ones); owner is a Jira user key like JIRAUSER10000 (resolve with find_jira_user); estimatedTime is in milliseconds. testScript formats: STEP_BY_STEP with steps (a step carrying testCaseKey is a 'Call to Test' that inlines another test case), PLAIN_TEXT with text, or BDD with text holding the full Gherkin document (stored verbatim).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Test case name | |
| owner | No | Owner. Jira *user key* (e.g. 'JIRAUSER10000'), NOT a username or e-mail — resolve it with find_jira_user. | |
| folder | No | Full folder path from the root starting with "/", e.g. "/Regression/Payments". The folder MUST already exist (create it with create_folder). | |
| labels | No | Labels; the API replaces spaces with underscores | |
| status | No | Test case status. Defaults: 'Draft', 'Approved', 'Deprecated' — case-sensitive; instances may define custom ones. | |
| priority | No | Priority. Defaults: 'High', 'Normal', 'Low' — case-sensitive; instances may define custom ones. | |
| component | No | Name of a Jira component of the project | |
| objective | No | Objective (HTML allowed) | |
| issueLinks | No | Jira issue keys to link, e.g. ["PROJ-123"] | |
| parameters | No | Test case parameters: { variables: [{name, type: FREE_TEXT | DATA_SET, dataSet?}], entries: [{<variable>: <value>}] } | |
| projectKey | No | Jira project key; defaults to ZEPHYR_DEFAULT_PROJECT_KEY | |
| testScript | No | Test script. STEP_BY_STEP: {type, steps: [{description?, testData?, expectedResult?, testCaseKey?}]}; PLAIN_TEXT/BDD: {type, text}. | |
| customFields | No | Custom field values keyed by field name | |
| precondition | No | Precondition (HTML allowed) | |
| estimatedTime | No | Estimated duration in milliseconds |