QTM4J: Update Test Case Execution
qtm4j_update_test_case_executionUpdate a test case execution in SmartBear qTest by setting its result, comment, environment, build, assignee, planned date, or actual time. Provide test cycle and test case keys to apply changes.
Instructions
Update a test case execution (execution result, comment, environment, build, assignee, planned date, actual time). Looks up testCaseExecutionId from testCycleKey and testCaseKey; resolves executionResultId, environmentId, and buildId names to numeric IDs.
Toolset: Test Executions
Parameters:
testCycleKey (string) required: Test cycle key in the format '{PROJECT_KEY}-TR-{number}', e.g. 'SCRUM-TR-101'. Used directly as the API path parameter.
testCaseKey (string) required: Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'.
executionResultId (string): Execution result name, e.g. 'Pass', 'Fail', 'Blocked', 'In Progress', 'Not Executed'. Project-specific (custom results allowed); resolved case-insensitively to a numeric executionResultId.
comment (string): Execution comment. Pass null to clear the existing comment.
actualTime (string): Time already spent on the execution. Format: 'HH:mm:ss' e.g. '02:30:00' (2 hours 30 minutes 0 seconds). Pass null to clear.
executionAssignee (string): Jira account ID of the assignee (not a display name). Pass null to unassign.
environmentId (string): Environment name (e.g. 'Production', 'Staging', 'Google Chrome', 'Firefox'). Auto-resolved to its numeric ID; an unresolved name is dropped and a warning is returned.
executionPlannedDate (string): Planned execution date. Format: 'dd/MMM/yyyy' e.g. '15/Oct/2025'. Month must be capitalised (Oct, not oct or OCT). Pass null to clear.
buildId (string): Build name (e.g. 'Build 2.0', '1.0.0'). Auto-resolved to its numeric ID; an unresolved name is dropped and a warning is returned. Pass null to clear.
Output Description: Confirmation object with testCycleKey, testCaseKey, and updated: true. Warnings are returned in content if any resolvable field (executionResultId, environmentId, buildId) could not be resolved and was dropped.
Use Cases: 1. Set a test case execution result (e.g. Pass, Fail, Blocked) 2. Update comment, environment, build, assignee, planned date, or actual time on an execution
Examples:
Mark test case as Pass
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"executionResultId": "Pass"
}Expected Output: { testCycleKey: 'PROJ-TR-101', testCaseKey: 'PROJ-TC-42', updated: true }
Update with comment, environment, and actual time
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"executionResultId": "Pass",
"comment": "All smoke tests passed.",
"environmentId": "Production",
"actualTime": "01:30:00"
}Expected Output: { testCycleKey: 'PROJ-TR-101', testCaseKey: 'PROJ-TC-42', updated: true }
Clear comment
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"comment": null
}Expected Output: { testCycleKey: 'PROJ-TR-101', testCaseKey: 'PROJ-TC-42', updated: true }
Hints: 1. Call set_project_context before this tool. 2. At least one updatable field must be provided. 3. environmentId and buildId accept environment/build name as strings that are resolved to numeric IDs; unresolved names are dropped and a warning is returned. 4. actualTime must be in 'HH:mm:ss' format (e.g. '01:30:00'). Always include seconds
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buildId | No | Build name (e.g. 'Build 2.0', '1.0.0'). Auto-resolved to its numeric ID; an unresolved name is dropped and a warning is returned. Pass null to clear. | |
| comment | No | Execution comment. Pass null to clear the existing comment. | |
| actualTime | No | Time already spent on the execution. Format: 'HH:mm:ss' e.g. '02:30:00' (2 hours 30 minutes 0 seconds). Pass null to clear. | |
| testCaseKey | Yes | Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. | |
| testCycleKey | Yes | Test cycle key in the format '{PROJECT_KEY}-TR-{number}', e.g. 'SCRUM-TR-101'. Used directly as the API path parameter. | |
| environmentId | No | Environment name (e.g. 'Production', 'Staging', 'Google Chrome', 'Firefox'). Auto-resolved to its numeric ID; an unresolved name is dropped and a warning is returned. | |
| executionAssignee | No | Jira account ID of the assignee (not a display name). Pass null to unassign. | |
| executionResultId | No | Execution result name, e.g. 'Pass', 'Fail', 'Blocked', 'In Progress', 'Not Executed'. Project-specific (custom results allowed); resolved case-insensitively to a numeric executionResultId. | |
| executionPlannedDate | No | Planned execution date. Format: 'dd/MMM/yyyy' e.g. '15/Oct/2025'. Month must be capitalised (Oct, not oct or OCT). Pass null to clear. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updated | Yes | True when the server returned 204 No Content, confirming the execution was updated successfully. | |
| testCaseKey | Yes | Test case key of the updated execution. | |
| testCycleKey | Yes | Test cycle key of the updated execution. |