QMetry: Link Test Cases to Test Suite
qmetry_link_test_cases_to_test_suiteLink test cases to a test suite by providing the test suite ID and an array of test case version IDs.
Instructions
Link test cases to a test suite in QMetry.
Toolset: Test Suites
Parameters:
tsID (number) required: Id of Test Suite (required). CRITICAL: parameter name is 'tsID' — do NOT use 'testSuiteId', 'testSuiteID', or other variants.
tcvdIDs (array) required: Array of Test Case Version IDs (required if fromReqs is false). CRITICAL: parameter name is 'tcvdIDs' — do NOT use 'tcVersionIds', 'testCaseVersionIds', or other variants.
fromReqs (boolean): Link TestCases from Requirements (optional, default false)
Output Description: JSON object with linkage status and details.
Use Cases: 1. Link test cases to a test suite by entity keys 2. Bulk link multiple test cases to a suite 3. Automate test suite composition from test cases
Examples:
Link test cases to a test suite
{
"tsID": 8674,
"tcvdIDs": [
5448504,
5448503
],
"fromReqs": false
}Expected Output: Test cases QTM-TC-32 and QTM-TC-35 linked to test suite 8674.
Link test cases directly to test suites with test cases entityKeys VT-TC-9, VT-TC-10 to test suite id 1487397
{
"tsID": 1487397,
"tcvdIDs": [
5448504,
5448503
],
"fromReqs": false
}Expected Output: Test cases VT-TC-9 and VT-TC-10 linked to test suite 1487397.
Link test case VT-TC-4, VT-TC-1,VT-TC-101, VT-TC-22 to test suite VT-TS-3
{
"tsID": 1487397,
"tcvdIDs": [
5448504,
5448503,
5448505,
5448506
],
"fromReqs": false
}Expected Output: Test cases VT-TC-4, VT-TC-1, VT-TC-101, and VT-TC-22 linked to test suite VT-TS-3.
Hints: 1. To get the tsID, call the Fetch Test Suites for Test Case API with rootFolderId otherwise if given folderid so use that and from response get the id. 2. To get the tcvdIDs by testcase entityKey, call the Testcase/Fetch Versions API and use data[].tcVersionID. 3. Set fromReqs to false to direct test case linkage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tsID | Yes | Id of Test Suite (required). CRITICAL: parameter name is 'tsID' — do NOT use 'testSuiteId', 'testSuiteID', or other variants. | |
| tcvdIDs | Yes | Array of Test Case Version IDs (required if fromReqs is false). CRITICAL: parameter name is 'tcvdIDs' — do NOT use 'tcVersionIds', 'testCaseVersionIds', or other variants. | |
| fromReqs | No | Link TestCases from Requirements (optional, default false) |