Zephyr: Update Test Case
zephyr_update_test_caseUpdate an existing Zephyr test case by merging changes to preserve unspecified properties. Set null to remove a property, or provide values to override.
Instructions
Update an existing Test Case in Zephyr. This operation fetches the current test case and merges your updates with it to prevent accidental property deletion. Properties which are not included in the tool call will be left unchanged. To remove a property, set it to null explicitly. For fields that accept multiple values, such as labels, if the field is provided, it will override the previous values. For example, if labels is provided with the values ["label1", "label2"], the Test Case will now only have those two labels, and any previous labels will be removed. If you want to add a label, you would need to specify in the prompt the intention to add a label.
Toolset: Test Cases
Examples:
Update the name of the test case 'SA-T10' to 'Check axial pump' and objective to 'To ensure the axial pump can be enabled'
{
"testCaseKey": "SA-T10",
"name": "Check axial pump",
"objective": "To ensure the axial pump can be enabled"
}Expected Output: The test case should be updated, but no output is expected.
Update the test case 'MM2-T1' by setting labels 'Regression','Performance' and 'Automated' and changing the priority to the one with id 2.
{
"testCaseKey": "MM2-T1",
"priority": {
"id": 2
},
"labels": [
"Regression",
"Performance",
"Automated"
]
}Expected Output: The test case should be updated, but no output is expected.
Update test case 'SA-T5', by setting the custom field 'Build Number' to 20, 'Release Date' to '2020-01-01' and setting the Test Cases's estimated time to 3600000 milliseconds.
{
"testCaseKey": "SA-T5",
"estimatedTime": 3600000,
"customFields": {
"Build Number": 20,
"Release Date": "2020-01-01"
}
}Expected Output: The test case should be updated, but no output is expected.
Remove the component from test case 'SA-T20'.
{
"testCaseKey": "SA-T20",
"component": null
}Expected Output: The test case should be updated, but no output is expected.
Remove a specific custom field 'Pre-Condition(s)' from test case 'SA-T15' while keeping other custom fields intact
{
"testCaseKey": "SA-T15",
"customFields": {
"Pre-Condition(s)": null,
"Implemented": false
}
}Expected Output: The test case should be updated, but no output is expected.
Remove test case from folder
{
"testCaseKey": "SA-T15",
"folder": null
}Expected Output: The test case should be updated, but no output is expected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The ID of the entity | |
| key | No | The test case key | |
| name | No | ||
| owner | No | Atlassian Account ID of the Jira user. | |
| folder | No | The ID of the folder, to remove folder set it's value to null | |
| labels | No | Array of labels associated to this entity. | |
| status | No | ID and link to the status resource. | |
| project | No | ID and link relative to Zephyr project. | |
| priority | No | ID and link to the priority resource. | |
| component | No | ID and link to the Jira component resource. | |
| objective | No | A description of the objective. | |
| testCaseKey | Yes | The key of the test case. Test case keys are of the format [A-Z]+-T[0-9]+ | |
| customFields | No | Multi-line text fields support HTML and should denote new lines with the \<br\> tag. Dates should be in the format 'yyyy-MM-dd'. Users should have values of Jira User Account IDs. | |
| precondition | No | Any conditions that need to be met. | |
| estimatedTime | No | Estimated duration in milliseconds. |