QTM4J: Get Linked Test Cases for Requirement
qtm4j_get_linked_test_cases_for_requirementRetrieve test cases linked to a Jira requirement, with filters for status or priority. Paginate and select fields for efficient traceability audits.
Instructions
Retrieve the test cases linked to a Jira requirement in QTM4J. Requirement key is resolved to internal ID automatically.
Toolset: Requirements
Parameters:
requirementKey (string) required: Jira requirement key (e.g., 'SCRUM-1'). Resolved to the internal Jira issue ID automatically.
filter (object): Optional filter to narrow down the linked test cases. projectId is auto-filled from the active project context.
fields (string): Comma-separated field names to include in each result. Allowed: summary, priority, status, estimatedTime, executed, description, assignee, reporter, labels, components, fixVersions, sprint, isAutomated, folder, updated, created, seqNo, flakyScore, passRateScore.
maxResults (number): Maximum results per page (1-100). Default: 50.
startAt (number): Zero-indexed offset for pagination. Default: 0.
sort (string): Sort in 'field:asc|desc' format. Allowed fields: key, summary, created, updated, estimatedTime, status, priority, latestVersionNo, seqNo, flakyScore, passRateScore.
Output Description: Paginated response with total, startAt, maxResults, and data array of linked test case objects.
Use Cases: 1. Check which test cases cover a Jira story or bug 2. Audit requirement traceability — find all test cases for a given requirement 3. Filter linked test cases by status or priority before a release 4. Retrieve test case keys to use in update or link operations
Examples:
Get all test cases linked to a requirement
{
"requirementKey": "SCRUM-1"
}Expected Output: Paginated list of linked test cases
Get high priority linked test cases
{
"requirementKey": "SCRUM-5",
"filter": {
"priority": [
"High"
]
},
"fields": "key,summary,status,priority",
"sort": "key:asc"
}Expected Output: Filtered high-priority test cases linked to requirement
Paginate through linked test cases
{
"requirementKey": "SCRUM-1",
"maxResults": 20,
"startAt": 20
}Expected Output: Second page of linked test cases
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. REQUIREMENT KEY FORMAT: '{PROJECT_KEY}-{number}' — e.g. 'SCRUM-1'. 3. projectId in filter is auto-filled from the active project context — do not set it manually. 4. Use the fields param to limit response size — only request fields you need. 5. Paginate using startAt — increment by maxResults until startAt >= total. 6. filter.testCaseStatus can be 'active', 'archived', or 'deleted' to filter by archive state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort in 'field:asc|desc' format. Allowed fields: key, summary, created, updated, estimatedTime, status, priority, latestVersionNo, seqNo, flakyScore, passRateScore. | |
| fields | No | Comma-separated field names to include in each result. Allowed: summary, priority, status, estimatedTime, executed, description, assignee, reporter, labels, components, fixVersions, sprint, isAutomated, folder, updated, created, seqNo, flakyScore, passRateScore. | |
| filter | No | Optional filter to narrow down the linked test cases. projectId is auto-filled from the active project context. | |
| startAt | No | Zero-indexed offset for pagination. Default: 0. | |
| maxResults | No | Maximum results per page (1-100). Default: 50. | |
| requirementKey | Yes | Jira requirement key (e.g., 'SCRUM-1'). Resolved to the internal Jira issue ID automatically. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Test cases on this page | |
| total | Yes | Total test cases matching the filter (across all pages) | |
| startAt | Yes | Offset of this page | |
| maxResults | Yes | Page size used for this response |