QTM4J: Update Test Step Execution
qtm4j_update_test_step_executionUpdate a test step execution in SmartBear by setting the execution result, actual result, or comment. Specify the test cycle and test case keys with the step sequence number to record outcome details and keep test results current.
Instructions
Update a test step execution (execution result, actual result, comment). Looks up testStepExecutionId from testCycleKey, testCaseKey, and step sequence number; resolves executionResultId name to a numeric ID.
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'.
testStepSeqNo (number) required: sequence number of the step to update (e.g. 2 = the second step).
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): Step execution comment. Pass null to clear the existing comment.
actualResult (string): Actual result for this test step. Set to null to clear the existing value.
Output Description: Confirmation object with testCycleKey, testCaseKey, testStepSeqNo, and updated: true. executionResultName is included when the server returns it. Warnings are returned in content if executionResultId name could not be resolved.
Use Cases: 1. Set a test step execution result (e.g. Pass, Fail, Blocked) 2. Update actualResult or comment on a test step execution
Examples:
Mark step 2 as Pass
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"testStepSeqNo": 2,
"executionResultId": "Pass"
}Expected Output: { testCycleKey: 'PROJ-TR-101', testCaseKey: 'PROJ-TC-42', testStepSeqNo: 2, executionResultName: 'Pass', updated: true }
Update step 3 with actualResult and comment
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"testStepSeqNo": 3,
"executionResultId": "Fail",
"actualResult": "Button not found on page.",
"comment": "Reproduced consistently in Chrome."
}Expected Output: { testCycleKey: 'PROJ-TR-101', testCaseKey: 'PROJ-TC-42', testStepSeqNo: 3, executionResultName: 'Fail', updated: true }
Clear actualResult on step 1
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"testStepSeqNo": 1,
"actualResult": null
}Expected Output: { testCycleKey: 'PROJ-TR-101', testCaseKey: 'PROJ-TC-42', testStepSeqNo: 1, updated: true }
Hints: 1. Call set_project_context before this tool. 2. At least one updatable field must be provided.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | No | Step execution comment. Pass null to clear the existing comment. | |
| testCaseKey | Yes | Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. | |
| actualResult | No | Actual result for this test step. Set to null to clear the existing value. | |
| testCycleKey | Yes | Test cycle key in the format '{PROJECT_KEY}-TR-{number}', e.g. 'SCRUM-TR-101'. Used directly as the API path parameter. | |
| testStepSeqNo | Yes | sequence number of the step to update (e.g. 2 = the second step). | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updated | Yes | True when the server confirms the update (HTTP 200 OK) and the test step execution is successfully updated. | |
| testCaseKey | Yes | Key of the test case whose step execution was updated (e.g. 'SCRUM-TC-145'). | |
| testCycleKey | Yes | Key of the test cycle containing the updated step execution (e.g. 'SCRUM-TR-101'). | |
| testStepSeqNo | Yes | sequence number of the test step whose execution was updated. | |
| executionResultName | No | Name of the execution result applied to the step (e.g. 'Pass', 'Fail'). Present only when the server returns it. |