QTM4J: Get Test Steps
qtm4j_get_test_stepsRetrieve test steps for a test case by key and version. Filter by step details, test data, or expected result, sort by sequence number, and paginate results.
Instructions
Get test steps for a test case by its key and version. Accepts the human-readable key (e.g. 'SCRUM-TC-145') and resolves it to the internal ID automatically.
Toolset: Test Cases
Parameters:
key (string) required: Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. PROJECT_KEY is the Jira project key (e.g. 'SCRUM'). The number is the test case counter within that project (auto-incremented, not related to seqNo). Obtain keys from the search_test_cases tool or directly from QTM4J.
versionNo (number): Test case version number. Defaults to the latest version if omitted. Obtain from search_test_cases response field: version.versionNo
filter (object): Text filters for test steps — each field performs a substring match. Multiple fields are combined with AND.
startAt (number): Zero-indexed offset for pagination (URL query param). Default: 0. (default: 0)
maxResults (number): Number of steps per page (URL query param). Default: 50. Maximum: 100. (default: 50)
sort (string): Sort pattern (URL query param). Format: 'fieldName:order'. Sortable fields: stepDetails, testData, seqNo, expectedResult. Order values: 'asc' or 'desc'. Example: 'seqNo:asc'
Output Description: JSON object with total (total matching steps), startAt, maxResults, and data (array of step objects). Each step has: id, seqNo, stepDetails, testData, expectedResult, attachmentCount. Shared steps also have a 'shareable' object containing shareableTestcaseUID and shareableTestSteps array.
Use Cases: 1. View all steps of a test case before executing it 2. Review steps for a specific test case version 3. Filter steps by action text, test data, or expected result 4. Get steps for a test case found via search_test_cases 5. Inspect shared (reusable) steps embedded in a test case 6. Sort steps by sequence number to view them in execution order 7. Paginate through test cases that have a large number of steps
Examples:
Get all steps for a test case (latest version)
{
"key": "SCRUM-TC-145"
}Expected Output: All steps for SCRUM-TC-145 with stepDetails, testData, expectedResult, and any shared step blocks
Get steps for a specific version
{
"key": "SCRUM-TC-145",
"versionNo": 2
}Expected Output: Steps for version 2 of SCRUM-TC-145
Get steps in execution order
{
"key": "SCRUM-TC-85",
"sort": "seqNo:asc"
}Expected Output: All steps sorted by sequence number ascending
Filter steps by action text
{
"key": "SCRUM-TC-32",
"filter": {
"stepDetails": "Open the application"
}
}Expected Output: Steps whose stepDetails contain 'Open the application'
Filter steps by expected result
{
"key": "SCRUM-TC-65",
"filter": {
"expectedResult": "logged in successfully"
}
}Expected Output: Steps whose expectedResult contains 'logged in successfully'
Filter steps by test data
{
"key": "SCRUM-TC-125",
"filter": {
"testData": "Username: user1"
}
}Expected Output: Steps with testData containing 'Username: user1'
Paginate through many steps
{
"key": "SCRUM-TC-105",
"startAt": 0,
"maxResults": 10,
"sort": "seqNo:asc"
}Expected Output: First 10 steps in sequence order
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. KEY FORMAT: '{PROJECT_KEY}-TC-{number}' — e.g. 'SCRUM-TC-145'. PROJECT_KEY is the Jira project key; the number is the test case counter within that project (auto-incremented, not the same as seqNo). 3. VERSION: versionNo defaults to the latest version. Get the version number from search_test_cases response: version.versionNo. 4. Use search_test_cases to discover test case keys before calling this tool. 5. SHAREABLE STEPS: Steps with a non-null 'shareable' field are references to shared/reusable test cases. The 'shareable.shareableTestSteps' array contains the embedded sub-steps with decimal seqNo values (e.g. '1.1', '1.2'). 6. FILTER: Each filter field is a substring match (case-insensitive). Multiple fields combine with AND. 7. SORT: 'seqNo:asc' shows steps in their natural execution order. Allowed sort fields: stepDetails, testData, seqNo, expectedResult. 8. PAGINATION: startAt and maxResults are URL query params. Default page size is 50, maximum is 100.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. PROJECT_KEY is the Jira project key (e.g. 'SCRUM'). The number is the test case counter within that project (auto-incremented, not related to seqNo). Obtain keys from the search_test_cases tool or directly from QTM4J. | |
| sort | No | Sort pattern (URL query param). Format: 'fieldName:order'. Sortable fields: stepDetails, testData, seqNo, expectedResult. Order values: 'asc' or 'desc'. Example: 'seqNo:asc' | |
| filter | No | Text filters for test steps — each field performs a substring match. Multiple fields are combined with AND. | |
| startAt | No | Zero-indexed offset for pagination (URL query param). Default: 0. | |
| versionNo | No | Test case version number. Defaults to the latest version if omitted. Obtain from search_test_cases response field: version.versionNo | |
| maxResults | No | Number of steps per page (URL query param). Default: 50. Maximum: 100. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Test steps on this page | |
| total | Yes | Total steps matching the filter (across all pages) | |
| startAt | Yes | Offset of this page | |
| maxResults | Yes | Page size used for this response |