QTM4J: Update Test Case
qtm4j_update_test_caseUpdate an existing test case by modifying priority, status, summary, or other fields. Add or remove labels and components with auto-resolved names.
Instructions
Update an existing test case in QTM4J. Supports auto-resolving human-readable names for priority, status, labels, and components. Labels and components support add/delete operations.
Toolset: Test Cases
Parameters:
key (string) required: Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. Automatically resolved to the internal ID and latest version.
versionNo (number): Test case version number to update. Defaults to the latest version if omitted.
summary (string): Updated test case summary/title.
description (string): Updated test case description.
precondition (string): Updated precondition — conditions that must be true before the test is executed.
priority (string): Priority name (e.g., 'High', 'Medium', 'Low'). Auto-resolved to ID. Use values from set_project_context response.
status (string): Status name (e.g., 'To Do', 'In Progress', 'Done'). Auto-resolved to ID. Use values from set_project_context response.
assignee (string): Assignee Jira account ID (e.g., '5b10a2844c20165700ede21f').
estimatedTime (string): Estimated time in HH:MM:SS format (e.g., '02:30:00').
labels (object): Labels to add or remove by name. Each name is auto-resolved to its ID.
components (object): Components to add or remove by name. Each name is auto-resolved to its ID.
Output Description: Confirmation object with the test case key, versionNo updated, and updated: true. Warnings are included if any field names could not be resolved.
Use Cases: 1. Change the priority of a test case (e.g., escalate to 'High') 2. Update the status of a test case after review 3. Add new labels or remove outdated ones without affecting other labels 4. Add or remove components from a test case 5. Update summary, description, or precondition text 6. Reassign a test case to a different team member 7. Set or update the estimated time for a test case 8. Batch-update metadata as part of sprint planning
Examples:
Change the priority of a test case
{
"key": "SCRUM-TC-145",
"priority": "High"
}Expected Output: Test case updated with new priority
Add a label and remove an old one
{
"key": "SCRUM-TC-145",
"labels": {
"add": [
"Release_2"
],
"delete": [
"Release_1"
]
}
}Expected Output: Test case updated — Release_2 added, Release_1 removed
Update summary, status, and add a component
{
"key": "SCRUM-TC-32",
"summary": "Verify login with MFA enabled",
"status": "In Progress",
"components": {
"add": [
"Auth"
]
}
}Expected Output: Test case summary and status updated, Auth component added
Update a specific version
{
"key": "SCRUM-TC-85",
"versionNo": 2,
"assignee": "5b10a2844c20165700ede21f",
"estimatedTime": "01:30:00"
}Expected Output: Version 2 of test case updated with new assignee and estimated time
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. KEY FORMAT: '{PROJECT_KEY}-TC-{number}' — e.g. 'SCRUM-TC-145'. 3. Priority and status values come from set_project_context. Use NLP to map user intent to available names. 4. If priority or status name is not found, the field is skipped with a warning and other fields are still updated. 5. Labels and components use add/delete — you can add and delete in a single call. Names are auto-resolved. 6. To delete ALL current entries of any add/delete field: first call search_test_cases with filter.searchText set to the test case key and include the relevant field in the fields list, extract all current names from the response, then pass them in the delete array of this tool. 7. Only provide the fields you want to change. Omitted fields remain unchanged on the server. 8. estimatedTime must be in HH:MM:SS format (e.g., '02:30:00'). 9. versionNo defaults to the latest version. Use search_test_cases to find available versions if needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. Automatically resolved to the internal ID and latest version. | |
| labels | No | Labels to add or remove by name. Each name is auto-resolved to its ID. | |
| status | No | Status name (e.g., 'To Do', 'In Progress', 'Done'). Auto-resolved to ID. Use values from set_project_context response. | |
| summary | No | Updated test case summary/title. | |
| assignee | No | Assignee Jira account ID (e.g., '5b10a2844c20165700ede21f'). | |
| priority | No | Priority name (e.g., 'High', 'Medium', 'Low'). Auto-resolved to ID. Use values from set_project_context response. | |
| versionNo | No | Test case version number to update. Defaults to the latest version if omitted. | |
| components | No | Components to add or remove by name. Each name is auto-resolved to its ID. | |
| description | No | Updated test case description. | |
| precondition | No | Updated precondition — conditions that must be true before the test is executed. | |
| estimatedTime | No | Estimated time in HH:MM:SS format (e.g., '02:30:00'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Test case key that was updated | |
| updated | Yes | Confirms the update was applied | |
| versionNo | Yes | Version number that was updated |