QMetry: Link Issues to Testcase Run
qmetry_link_issues_to_testcase_runLink issues to a QMetry testcase run to associate defects with test executions and maintain traceability.
Instructions
Link one or more issues to a QMetry Testcase Run (execution).
Toolset: Issues
Parameters:
projectKey (string): Project key - unique identifier for the project (default: "default")
baseUrl (string): The base URL for the QMetry instance (must be a valid URL)
issueIds (array) required: ID of issues to be linked to Testcase Run
tcrId (number) required: ID of Testcase Run to link issues with. CRITICAL: parameter name is 'tcrId' — do NOT use 'tcRunId', 'testCaseRunId', or other variants. Accepts a string or number.
Output Description: JSON object with linkage status and details.
Use Cases: 1. Link a single issue to a testcase run 2. Link multiple issues to a testcase run 3. Automate defect association during test execution 4. Maintain traceability between defects and test runs
Examples:
Link one issue to a testcase run
{
"issueIds": [
"5054834"
],
"tcrId": 567890
}Expected Output: Issue 5054834 linked to testcase run 567890 successfully.
Link multiple issues to a testcase run
{
"issueIds": [
"5054834",
"5054835"
],
"tcrId": 567890
}Expected Output: Issues 5054834, 5054835 linked to testcase run 567890 successfully.
Hints: 1. if you have pass issue key (VT-IS-5, MAC-IS-10 etc.) then first fetch issue by issue key to get issue id. 2. To get the issueIds, call the Fetch issues linked with testcases tool and use data[].defectID from the response. 3. To get the tcrId, call the Execution/Fetch Testcase Run ID tool and use data[].tcRunID from the response. 4. Both issueIds and tcrId are required. 5. You can link multiple issues at once by providing an array of IDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tcrId | Yes | ID of Testcase Run to link issues with. CRITICAL: parameter name is 'tcrId' — do NOT use 'tcRunId', 'testCaseRunId', or other variants. Accepts a string or number. | |
| baseUrl | No | The base URL for the QMetry instance (must be a valid URL) | |
| issueIds | Yes | ID of issues to be linked to Testcase Run | |
| projectKey | No | Project key - unique identifier for the project | default |