update_test_case
Partially update a Zephyr Scale test case by providing only fields to change. For step-by-step scripts, pass the complete list of steps with existing ids to modify, create, or delete steps.
Instructions
Update a Zephyr Scale test case (PUT /testcase/{testCaseKey}). PARTIAL update: only the fields you pass are changed; omitted fields keep their current values — never send empty placeholders. projectKey cannot be changed. STEP_BY_STEP step synchronization: when testScript.steps is passed, steps are matched by id — a step WITHOUT an id is CREATED, a step WITH an id is UPDATED, and any existing step MISSING from the list is DELETED. Therefore always pass the COMPLETE final list of steps, carrying over the ids of steps to keep (read them with get_test_case). To merely add steps, prefer add_test_steps, which performs that read-merge-write safely. Returns { key, url }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | 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>}] } | |
| testScript | No | Test script. STEP_BY_STEP: {type, steps: [{description?, testData?, expectedResult?, testCaseKey?}]}; PLAIN_TEXT/BDD: {type, text}. | |
| testCaseKey | Yes | Test case key, e.g. PROJ-T123 | |
| customFields | No | Custom field values keyed by field name | |
| precondition | No | Precondition (HTML allowed) | |
| estimatedTime | No | Estimated duration in milliseconds |