QMetry: Link Requirements to Testcase
qmetry_link_requirements_to_testcaseLink one or more requirements to a test case by entityKey and version IDs to establish traceability and automate coverage mapping.
Instructions
Link one or more requirements to a test case by entityKey and version IDs.
Toolset: Requirements
Parameters:
tcID (string) required: EntityKey of Testcase (e.g. 'COD-TC-29')
tcVersionId (number) required: Test Case version number. This is the internal numeric identifier for the version.
rqVersionIds (string) required: Comma-separated values of versionId of the Requirement (e.g. '236124,236125')
Output Description: JSON object with success status and linkage details.
Use Cases: 1. Link requirements to a test case for traceability 2. Bulk link multiple requirements to a single test case 3. Automate requirement coverage mapping
Examples:
Link requirements to test case VT-TC-26
{
"tcID": "VT-TC-26",
"tcVersionId": 5448515,
"rqVersionIds": "5009939,5009937,4970699"
}Expected Output: Requirements linked to test case VT-TC-26 successfully.
Hints: 1. To get the tcID, call the Testcase/Fetch List for Bulk Operation API and use data[].entityKey. 2. To get the tcVersionId, call the Testcase/Fetch Versions API and use data[].tcVersionID. 3. To get the rqVersionIds, call the requirement/List Versions API and use data[].rqVersionID. 4. If user provides requirement entityKey (e.g., VT-RQ-18), first call requirements list with a filter on entityKeyId to resolve the rqVersionIds 5. If user provides testcase entityKey (e.g., VT-TC-26), first call testcase list with a filter on entityKeyId to resolve the tcVersionId and tcID. 6. rqVersionIds must be a comma-separated string of requirement version IDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tcID | Yes | EntityKey of Testcase (e.g. 'COD-TC-29') | |
| tcVersionId | Yes | Test Case version number. This is the internal numeric identifier for the version. | |
| rqVersionIds | Yes | Comma-separated values of versionId of the Requirement (e.g. '236124,236125') |