QMetry: Bulk Update Test Case Execution Status
qmetry_bulk_update_test_case_execution_statusBulk-updates execution status for single or multiple test case runs and fills mandatory Test Run UDFs before applying the status, keeping QMetry execution records accurate.
Instructions
Update execution status for individual or multiple test case runs in bulk, enforcing mandatory Test Run UDFs
Toolset: Test Suites
Parameters:
projectKey (string): Project key - unique identifier for the project (default: "default")
entityIDs (string) required: Comma-separated IDs of Test Case Runs to update. CRITICAL: the parameter name is 'entityIDs' — do NOT use 'tcRunIDs', 'testCaseRunIds', 'runIds', or other variants. Accepts a number or string (e.g., 66095087 or '66095087' for single, '66095069,66095075' for bulk). To get the entityIDs - Call API 'Execution/Fetch Testcase Run ID'. From the response, get value -> data[].tcRunID
entityType (enum): Type of Entity to Execute: 'TCR' (Test Case Run) or 'TCSR' (Test Case Step Run) (default: "TCR")
qmTsRunId (string) required: Id of Test Suite Run to execute (required). CRITICAL: the parameter name is 'qmTsRunId' — do NOT use 'tsrunID', 'testSuiteRunId', 'tsRunID', or other variants. Accepts a number or string. To get the qmTsRunId - Call API 'Execution/Fetch Executions'. From the response, get value -> data[].tsRunID
runStatusID (number) required: Id of the execution status to set (required). To get the runStatusID - Call API 'Admin/Project GET info Service' From the response, get value of following attribute -> allstatus[].id Common statuses: Pass, Fail, Not Run, Blocked, WIP, etc.
dropID (union): Unique identifier of drop/build on which execution is to be performed (optional). To get the dropID - Call API 'Fetch Build/List' From the response, get value of following attribute -> data[].dropID
isAutoExecuted (enum): Set '1' for automated and '0' for manual Execution Type
isBulkOperation (boolean): Set true for bulk operations (multiple entityIDs), false for single execution update. Default: true if multiple comma-separated entityIDs, false otherwise
comments (string): Optional comments for the execution status update
username (string): If Part 11 Compliance is active then required for authentication
password (string): If Part 11 Compliance is active then required for authentication
qmRunObj (string): Internal QMetry run object (optional, usually empty string)
type (enum): Type of Entity - same as entityType (for backwards compatibility)
viewId (number): ViewId for test execution - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TE.viewId automatically.
udfValuesByRun (record<string, record<string, object>>): Optional Test Run UDF values to set BEFORE the status is updated, keyed per Test Case Run. Outer key: tcRunID (must be one of entityIDs). Inner key: UDF field 'name' (e.g. 'test_env' — NOT the 'FLD.' fieldKey). Inner value: { value, fieldID?, multiSelectAction? }. Use this to fill mandatory Test Run UDFs reported by a MANDATORY_TEST_RUN_UDF_MISSING response. Example: { "66095069": { "test_env": { "value": "QA" } }, "66095075": { "test_env": { "value": "UAT" } } }
Output Description: On success: { success: true, udfUpdates: [{ tcRunIDs, response }], statusUpdate: }. When mandatory Test Run UDFs are missing: { success: false, code: 'MANDATORY_TEST_RUN_UDF_MISSING', statusUpdated: false, runsMissingFields, lookupOptions?, _note }.
Use Cases: 1. Update single test case run status to Pass, Fail, Blocked, or Not Run 2. Bulk update multiple test case run statuses in a single operation 3. Mark all selected test case runs as Not Run for re-execution 4. Update execution status after manual test execution 5. Set execution status based on automated test results 6. Update test execution status across different test environments 7. Track test execution progress and completion 8. Manage test execution status for compliance and reporting 9. Fill mandatory Test Run UDFs per run and update the execution status in one call
Examples:
Update single test case run status to Failed (single execution)
{
"entityIDs": "66095087",
"entityType": "TCR",
"qmTsRunId": "2720260",
"runStatusID": 123266,
"isBulkOperation": false
}Expected Output: Test case run 66095087 status updated to Failed successfully
Bulk update two test case runs to Pass status (bulk execution)
{
"entityIDs": "66095069,66095075",
"entityType": "TCR",
"qmTsRunId": "2720260",
"runStatusID": 123268,
"isBulkOperation": true,
"comments": "All test cases passed successfully"
}Expected Output: Test case runs 66095069 and 66095075 updated to Pass status successfully
Bulk update all selected test case runs to Not Run status
{
"entityIDs": "66095069,66095075,66095081,66095087,66095093,66095099,66095105",
"entityType": "TCR",
"qmTsRunId": "2720260",
"runStatusID": 123269,
"isBulkOperation": true
}Expected Output: 7 test case runs updated to Not Run status successfully for re-execution
Update test case run with build/drop information
{
"entityIDs": "66095087",
"entityType": "TCR",
"qmTsRunId": "2720260",
"runStatusID": 123266,
"dropID": 947,
"isBulkOperation": false
}Expected Output: Test case run updated with execution status and build information
Update automated test execution status with automation flag
{
"entityIDs": "66095069,66095075",
"entityType": "TCR",
"qmTsRunId": "2720260",
"runStatusID": 123268,
"isAutoExecuted": "1",
"isBulkOperation": true,
"comments": "Automated test execution completed"
}Expected Output: Automated test case runs updated to Pass status with automation flag
Update test case run status with Part 11 Compliance authentication
{
"entityIDs": "66095087",
"entityType": "TCR",
"qmTsRunId": "2720260",
"runStatusID": 123266,
"username": "test.user",
"password": "password",
"isBulkOperation": false
}Expected Output: Test case run status updated with Part 11 Compliance authentication
Update ALL executions of test suite VKMC-TS-20 to Failed (MULTI-CALL OPERATION)
{
"entityIDs": "66341841,66342887,66342893,66342899",
"entityType": "TCR",
"qmTsRunId": "2733104",
"runStatusID": 123269,
"isBulkOperation": true
}Expected Output: Execution 1/4 updated. The MCP Agent will automatically repeat this operation for executions 2733205, 2733306, and 2733407 using their corresponding entityIDs.
Retry after MANDATORY_TEST_RUN_UDF_MISSING: fill mandatory Test Run UDF 'test_env' per run, then mark both runs Passed
{
"entityIDs": "66095069,66095075",
"entityType": "TCR",
"qmTsRunId": "2720260",
"runStatusID": 123268,
"isBulkOperation": true,
"udfValuesByRun": {
"66095069": {
"test_env": {
"value": "QA"
}
},
"66095075": {
"test_env": {
"value": "UAT"
}
}
}
}Expected Output: { success: true, udfUpdates: [{ tcRunIDs: [66095069], ... }, { tcRunIDs: [66095075], ... }], statusUpdate: {...} }
Hints: 1. CRITICAL: entityIDs, entityType, qmTsRunId, and runStatusID are REQUIRED parameters 2. 3. MANDATORY TEST RUN UDF GATE (entityType 'TCR', applies to EVERY target status including Not Run): 4. - Before updating, the tool checks each run's Test Run UDFs; fields with allowBlank=false are mandatory. 5. - If ANY run is missing a mandatory value, NOTHING is updated and the tool returns code 'MANDATORY_TEST_RUN_UDF_MISSING' with runsMissingFields[{ tcRunID, entityKey, missingFields[{ name, label, fieldID, fieldType, listName? }] }]. 6. - On that response: show the missing fields per run to the user, ask for the values (never invent them), then call this tool again with the same arguments plus 'udfValuesByRun'. 7. - 'udfValuesByRun' format: { '': { '': { value } } }. Keys are tcRunIDs from entityIDs; inner keys are the UDF 'name' (not the 'FLD.' fieldKey). fieldID is optional (auto-filled). 8. - Value formats: DATETIMEPICKER 'MM-DD-YYYY'; LOOKUPLIST option id (from lookupOptions[listName][].id); MULTILOOKUPLIST array of ids; CASCADINGLIST { parent, child }. 9. - Supplied UDF values are written first (Bulk Update Test Run UDFs), then the status is updated. Non-mandatory UDFs can also be set this way. 10. - entityType 'TCSR' (step runs) skips the gate; 'udfValuesByRun' is rejected for TCSR. 11. - viewId is auto-resolved (latestViews.TE.viewId); do not pass it unless you have a specific one. 12. 13. CRITICAL - ALWAYS FETCH STATUS IDs FROM PROJECT INFO: 14. NEVER use hardcoded or memorized status IDs. Status IDs are PROJECT-SPECIFIC and must be fetched dynamically. 15. MANDATORY WORKFLOW BEFORE USING runStatusID: 16. 1. Call mcp_smartbear_qmetry_fetch_qmetry_project_info with the current projectKey 17. 2. Extract the 'allstatus' array from the response 18. 3. Match the desired status NAME to find its corresponding ID 19. 4. Use the fetched ID in the runStatusID parameter 20. 21. EXAMPLE STATUS ID RESOLUTION: 22. User says: 'Update status to Failed' 23. Step 1: Call FETCH_PROJECT_INFO → Get allstatus array 24. Step 2: Find status where name='Failed' → Extract its id property 25. Step 3: Use that id as runStatusID (e.g., 123269 for 'Failed') 26. 27. COMMON STATUS NAMES (IDs vary by project - MUST VALIDATE): 28. - 'Passed' / 'Pass' - Test case executed successfully 29. - 'Failed' / 'Fail' - Test case failed with errors 30. - 'Blocked' - Test case cannot be executed due to blockers 31. - 'Not Run' - Test case not yet executed or needs re-execution 32. - 'WIP' / 'Work In Progress' - Test case execution in progress 33. - 'Not Applicable' - Test case not applicable for this execution 34. 35. WHY THIS IS CRITICAL: 36. - Status IDs are assigned per QMetry project and are NOT universal 37. - Using wrong status ID will update tests with incorrect status 38. - Example: ID 123268 might be 'Blocked' in one project but 'Passed' in another 39. - The allstatus array is the AUTHORITATIVE source for all status mappings 40. 41. HOW TO GET entityIDs (Test Case Run IDs): 42. 1. Call API 'Execution/Fetch Testcase Run ID' (FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN tool) 43. 2. From the response, get value of following attribute -> data[].tcRunID 44. 3. Example: Single ID '66095087' or Multiple IDs '66095069,66095075,66095081' 45. 4. For bulk operations, provide comma-separated IDs without spaces 46. HOW TO GET qmTsRunId (Test Suite Run ID): 47. 1. Call API 'Execution/Fetch Executions' (FETCH_EXECUTIONS_BY_TESTSUITE tool) 48. 2. From the response, get value of following attribute -> data[].tsRunID 49. 3. Example: Test Suite Run ID might be '2720260' 50. HOW TO GET runStatusID (Execution Status ID) - DETAILED PROCESS: 51. 1. Call API 'Admin/Get info Service' (FETCH_PROJECT_INFO tool) with projectKey 52. 2. From the response, locate the 'allstatus' array 53. 3. Search for the status object where name matches your desired status (case-insensitive) 54. 4. Extract the 'id' property from the matching status object 55. 5. NEVER use example IDs from documentation - they are project-specific 56. 57. EXAMPLE allstatus ARRAY STRUCTURE: 58. allstatus: [ 59. { name: 'Passed', defaultName: 'passed', id: 123266, color: '#14892C|#FFFFFF' }, 60. { name: 'Failed', defaultName: 'failed', id: 123269, color: '#FF6666|#FFFFFF' }, 61. { name: 'Blocked', defaultName: 'blocked', id: 123268, color: '#CCCCCC|#FFFFFF' }, 62. { name: 'Not Run', defaultName: 'notrun', id: 123270, color: '#205081|#FFFFFF', isdefault: true }, 63. { name: 'Not Applicable', defaultName: 'empty', id: 123267, color: '#59AFE1|#FFFFFF' } 64. ] 65. Note: Above IDs are EXAMPLES ONLY - fetch actual IDs from your project 66. HOW TO GET dropID (Build/Drop ID) - OPTIONAL: 67. 1. Call API 'Build/List' (FETCH_BUILDS tool) 68. 2. From the response, get value of following attribute -> data[].dropID 69. 3. Example: Build/Drop ID might be 947 70. ENTITY TYPES: 71. - 'TCR' = Test Case Run (most common use case) 72. - 'TCSR' = Test Case Step Run (for step-level execution updates) 73. BULK OPERATION FLAG: 74. - isBulkOperation=false: Single test case run update (one entityID) 75. - isBulkOperation=true: Multiple test case runs update (comma-separated entityIDs) 76. - Auto-detected: If entityIDs contains comma, defaults to true; otherwise false 77. AUTOMATION FLAG (isAutoExecuted) - OPTIONAL: 78. - '1' = Automated execution (test run by automation framework) 79. - '0' = Manual execution (test run by human tester) 80. - Used for execution tracking and reporting purposes 81. PART 11 COMPLIANCE (username & password) - CONDITIONAL: 82. - Required ONLY if Part 11 Compliance is active in your QMetry instance 83. - Used for regulatory compliance and audit trail purposes 84. - Not needed for standard QMetry installations 85. COMMENTS FIELD - OPTIONAL: 86. - Add execution notes, failure reasons, or status change context 87. - Useful for tracking why status was changed 88. - Appears in execution history and audit logs 89. COMMON EXECUTION STATUS NAMES: 90. - Pass: Test case executed successfully 91. - Fail: Test case failed with errors 92. - Blocked: Test case cannot be executed due to blockers 93. - Not Run: Test case not yet executed or needs re-execution 94. - WIP: Work In Progress - test case execution in progress 95. WORKFLOW FOR USER PROMPTS: 96. 1. If user says 'execute test case run by id to failed' or 'update status to fail': 97. - Fetch test case runs to get tcRunID (entityIDs) 98. - Fetch project info to get 'Fail' status ID (runStatusID) 99. - Set isBulkOperation=false for single ID 100. 2. If user says 'bulk update test case run status to pass' or 'update all to passed': 101. - Fetch test case runs to get multiple tcRunIDs 102. - Fetch project info to get 'Pass' status ID 103. - Set isBulkOperation=true 104. - Join multiple IDs with commas (no spaces) 105. 3. If user says 'execute status to not run of given test case run ids': 106. - Use provided IDs or fetch if needed 107. - Fetch project info to get 'Not Run' status ID 108. - Set isBulkOperation based on ID count 109. 4. If the user requests updating status for ALL executions of a test suite, the agent must: 110. 1. Call FETCH_EXECUTIONS_BY_TESTSUITE to get all qmTsRunIds. 111. 2. For each qmTsRunId: 112. - Call FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN to get tcRunID (entityIDs) 113. - Fetch project info to get 'Fail' status ID (runStatusID) 114. - Call BULK_UPDATE_EXECUTION_STATUS with the corresponding qmTsRunId + tcRunID + desired runStatusID 115. 3. Repeat until all executions are updated. 116. This tool is intended to be invoked multiple times in sequence for multi-execution updates. 117. FIELD MAPPING CRITICAL NOTES: 118. - entityIDs must be comma-separated STRING (e.g., '66095069,66095075') 119. - qmTsRunId must be STRING format (e.g., '2720260') 120. - runStatusID must be NUMERIC (e.g., 123268) 121. - dropID can be numeric or string (flexible) 122. API ENDPOINT: PUT /rest/execution/runstatus/bulkupdate 123. This tool is essential for test execution management and status tracking 124. Critical for maintaining accurate test execution records and reporting 125. Use for manual test execution updates and automated test result integration 126. Essential for test execution audit trails and compliance requirements
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Type of Entity - same as entityType (for backwards compatibility) | |
| dropID | No | Unique identifier of drop/build on which execution is to be performed (optional). To get the dropID - Call API 'Fetch Build/List' From the response, get value of following attribute -> data[<index>].dropID | |
| viewId | No | ViewId for test execution - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TE.viewId automatically. | |
| comments | No | Optional comments for the execution status update | |
| password | No | If Part 11 Compliance is active then required for authentication | |
| qmRunObj | No | Internal QMetry run object (optional, usually empty string) | |
| username | No | If Part 11 Compliance is active then required for authentication | |
| entityIDs | Yes | Comma-separated IDs of Test Case Runs to update. CRITICAL: the parameter name is 'entityIDs' — do NOT use 'tcRunIDs', 'testCaseRunIds', 'runIds', or other variants. Accepts a number or string (e.g., 66095087 or '66095087' for single, '66095069,66095075' for bulk). To get the entityIDs - Call API 'Execution/Fetch Testcase Run ID'. From the response, get value -> data[<index>].tcRunID | |
| qmTsRunId | Yes | Id of Test Suite Run to execute (required). CRITICAL: the parameter name is 'qmTsRunId' — do NOT use 'tsrunID', 'testSuiteRunId', 'tsRunID', or other variants. Accepts a number or string. To get the qmTsRunId - Call API 'Execution/Fetch Executions'. From the response, get value -> data[<index>].tsRunID | |
| entityType | No | Type of Entity to Execute: 'TCR' (Test Case Run) or 'TCSR' (Test Case Step Run) | TCR |
| projectKey | No | Project key - unique identifier for the project | default |
| runStatusID | Yes | Id of the execution status to set (required). To get the runStatusID - Call API 'Admin/Project GET info Service' From the response, get value of following attribute -> allstatus[<index>].id Common statuses: Pass, Fail, Not Run, Blocked, WIP, etc. | |
| isAutoExecuted | No | Set '1' for automated and '0' for manual Execution Type | |
| udfValuesByRun | No | Optional Test Run UDF values to set BEFORE the status is updated, keyed per Test Case Run. Outer key: tcRunID (must be one of entityIDs). Inner key: UDF field 'name' (e.g. 'test_env' — NOT the 'FLD.' fieldKey). Inner value: { value, fieldID?, multiSelectAction? }. Use this to fill mandatory Test Run UDFs reported by a MANDATORY_TEST_RUN_UDF_MISSING response. Example: { "66095069": { "test_env": { "value": "QA" } }, "66095075": { "test_env": { "value": "UAT" } } } | |
| isBulkOperation | No | Set true for bulk operations (multiple entityIDs), false for single execution update. Default: true if multiple comma-separated entityIDs, false otherwise |