QTM4J: Search Test Cases
qtm4j_search_test_casesSearch and filter test cases in a QTM4J project using filters like status, priority, labels, and assignee. Supports pagination, field selection, and sorting for efficient access.
Instructions
Search and filter test cases in a QTM4J project with support for pagination, field selection, and sorting.
Toolset: Test Cases
Parameters:
filter (object): Filter criteria — multiple fields are combined with AND; multiple values within one field use OR.
fields (array): Fields to include in each result object. If omitted, all fields are returned. Available fields: key, summary, description, priority, status, assignee, isAutomated, reporter, estimatedTime, labels, components, fixVersions, sprint, folders, updated, created, executed, flakyScore, passRateScore, aiGenerated, precondition, orderNo, seqNo, version. Example: ['key', 'summary', 'status', 'priority', 'assignee']
startAt (number): Zero-indexed offset for pagination (URL query param). First page: 0. Second page: 50 (when maxResults=50). Default: 0. (default: 0)
maxResults (number): Number of results per page (URL query param). Default: 50. Maximum: 50 (backend enforced). To page through results, increment startAt by 50 until startAt >= total. (default: 50)
sort (string): Sort pattern sent as a URL query param. Format: 'fieldName:order'. For multiple fields, comma-separate: 'priority:asc,created:desc'. Order values: 'asc' (oldest/lowest first) or 'desc' (newest/highest first). Sortable fields: key, summary, created, updated, status, priority, executed. Examples: 'created:desc', 'key:asc', 'priority:desc,created:asc'
Output Description: JSON object with total (total matching test cases), startAt, maxResults, and data (array of test case objects for this page).
Use Cases: 1. Search all test cases in a project 2. Filter test cases by status (e.g., 'Done', 'To Do', 'In Progress') 3. Filter test cases by priority (e.g., 'High', 'Medium', 'Low') 4. Filter test cases by labels and components 5. Search test cases by text in summary and description 6. Filter test cases by assignee or reporter 7. Filter test cases by creation/update date ranges 8. Filter test cases by automation status 9. Request only specific fields to reduce response size 10. Sort results using the sort query param (e.g., 'created:desc', 'priority:asc') 11. Paginate through large result sets using startAt and maxResults 12. Combine multiple filters for complex queries 13. Find all failed test cases that need attention (by status and execution date) 14. Get test cases for sprint planning (filter by sprint and status) 15. Audit test coverage by searching for untested areas (filter by executed date) 16. Find all manual test cases assigned to a specific tester 17. Generate test reports by filtering and sorting test cases 18. Track test case changes over time (filter by update date range) 19. Identify high-priority test cases pending review 20. Search for test cases related to specific features (using searchText) 21. Find duplicate or similar test cases (using searchText) 22. Get automated vs manual test distribution (filter by isAutomated) 23. Monitor test execution trends (filter by executed date ranges) 24. Prepare test execution schedules (filter by assignee and priority)
Examples:
Search all test cases in the project
{}Expected Output: Paginated list of all test cases with all fields (first 50 results)
Filter test cases by status
{
"filter": {
"status": [
"Done"
]
}
}Expected Output: List of test cases with 'Done' status
Filter by multiple statuses and priorities with specific fields
{
"filter": {
"status": [
"Done",
"To Do"
],
"priority": [
"High",
"Medium"
]
},
"fields": [
"key",
"summary",
"status",
"priority",
"assignee"
]
}Expected Output: Test cases matching the filters with only the selected fields returned
Search test cases by text in summary/description
{
"filter": {
"searchText": "login functionality"
}
}Expected Output: Test cases containing 'login functionality' in summary or description
Filter by labels and components
{
"filter": {
"labels": [
"Release_1",
"Sprint 1"
],
"components": [
"UI",
"Cloud"
]
}
}Expected Output: Test cases tagged with the specified labels and components
Filter by assignee and automation status
{
"filter": {
"assignee": [
"712020:ddc8e24b-2de7-404b-b9ed-3d7b241e2ced"
],
"isAutomated": false
}
}Expected Output: Manual test cases assigned to the specified user
Filter by creation date range
{
"filter": {
"createdOnFrom": "01/Jan/2026",
"createdOnTo": "31/Dec/2026"
}
}Expected Output: Test cases created during 2026
Paginate and sort by creation date (newest first)
{
"filter": {
"status": [
"Done"
]
},
"startAt": 0,
"maxResults": 50,
"sort": "created:desc"
}Expected Output: First 50 'Done' test cases sorted by creation date, newest first
Get all available fields for test cases
{
"filter": {},
"fields": [
"key",
"summary",
"description",
"priority",
"status",
"assignee",
"isAutomated",
"reporter",
"estimatedTime",
"labels",
"components",
"fixVersions",
"sprint",
"folders",
"updated",
"created",
"executed",
"flakyScore",
"passRateScore",
"aiGenerated",
"precondition",
"orderNo",
"seqNo",
"version"
]
}Expected Output: Test cases with all available fields explicitly requested
Filter by folder and fix version
{
"filter": {
"folders": [
123,
456
],
"fixVersions": [
789
]
}
}Expected Output: Test cases in the specified folders and fix versions
Complex filter: multiple criteria combined with multi-field sort
{
"filter": {
"status": [
"Done",
"In Progress"
],
"priority": [
"High"
],
"labels": [
"Release_1"
],
"isAutomated": false,
"createdOnFrom": "01/Apr/2026",
"createdOnTo": "30/Apr/2026"
},
"fields": [
"key",
"summary",
"status",
"priority",
"created"
],
"sort": "priority:asc,created:desc"
}Expected Output: High-priority manual test cases created in April 2026 with 'Done' or 'In Progress' status, sorted by priority ascending then creation date descending
Find all automated test cases for CI/CD pipeline
{
"filter": {
"isAutomated": true,
"status": [
"Done",
"In Progress"
]
},
"fields": [
"key",
"summary",
"status",
"labels",
"components"
]
}Expected Output: Up to 50 automated test cases ready for execution in CI/CD
Sprint planning: get pending test cases for a team, sorted by priority
{
"filter": {
"status": [
"To Do",
"In Progress"
],
"assignee": [
"712020:ddc8e24b-2de7-404b-b9ed-3d7b241e2ced",
"712020:b8479b55-6d23-478c-a2ad-4c8ce176e1fc"
],
"priority": [
"High",
"Medium"
]
},
"fields": [
"key",
"summary",
"status",
"priority",
"assignee",
"estimatedTime"
],
"sort": "priority:desc"
}Expected Output: Pending high and medium priority test cases assigned to the team, sorted by priority descending
Test coverage report: find completed cases sorted oldest first
{
"filter": {
"status": [
"Done"
]
},
"fields": [
"key",
"summary",
"priority",
"created",
"assignee"
],
"sort": "created:asc"
}Expected Output: Completed test cases sorted by creation date, oldest first
Find test cases by keyword for regression testing
{
"filter": {
"searchText": "authentication login",
"status": [
"Done"
]
},
"fields": [
"key",
"summary",
"description",
"labels",
"components"
]
}Expected Output: All completed test cases related to authentication/login functionality
Weekly test execution summary
{
"filter": {
"executedOnFrom": "27/Apr/2026",
"executedOnTo": "03/May/2026"
},
"fields": [
"key",
"summary",
"status",
"executed",
"passRateScore",
"flakyScore"
],
"sort": "executed:desc"
}Expected Output: Test cases executed in the past week with their pass rates and flaky scores, sorted most-recent first
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. REQUEST STRUCTURE: filter goes in the request body; fields, sort, startAt, and maxResults are URL query parameters. 3. The 'projectId' inside filter is auto-populated from the active project context if not provided. 4. All filter values accept string names directly — no ID resolution needed (e.g., status: ['Done'], priority: ['High']). 5. FIELDS: Pass as an array (sent as comma-separated URL param). Example: { fields: ['key', 'summary', 'status'] }. Omit to return all fields. 6. Available fields: key, summary, description, priority, status, assignee, isAutomated, reporter, estimatedTime, labels, components, fixVersions, sprint, folders, updated, created, executed, flakyScore, passRateScore, aiGenerated, precondition, orderNo, seqNo, version 7. SORTING: Use 'sort' with format 'fieldName:order' (asc/desc). Multiple fields: 'priority:asc,created:desc'. Sortable fields: key, summary, created, updated, status, priority, executed. 8. PAGINATION: startAt (default: 0) and maxResults (default: 50, max: 50) are sent as URL query params. Increment startAt by 50 to get the next page. Stop when startAt >= total. 9. Date format for all filter date fields: 'dd/MMM/yyyy' (e.g., '17/Apr/2026', '01/Jan/2026'). Case-sensitive. 10. FILTER LOGIC: Multiple values within one filter field use OR (status: ['Done', 'To Do'] = Done OR To Do). 11. FILTER LOGIC: Different filter fields are combined with AND (status + priority = both must match). 12. The 'searchText' filter searches both summary and description fields (case-insensitive). To get details of a specific test case by its key (e.g., 'SCRUM-TC-145'), pass the key as filter.searchText — there is no separate key filter field. 13. For assignee/reporter filters, use Jira account IDs (format: '712020:uuid'). Multiple IDs = OR logic. 14. Omitting filter entirely returns all test cases in the active project (paginated).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort pattern sent as a URL query param. Format: 'fieldName:order'. For multiple fields, comma-separate: 'priority:asc,created:desc'. Order values: 'asc' (oldest/lowest first) or 'desc' (newest/highest first). Sortable fields: key, summary, created, updated, status, priority, executed. Examples: 'created:desc', 'key:asc', 'priority:desc,created:asc' | |
| fields | No | Fields to include in each result object. If omitted, all fields are returned. Available fields: key, summary, description, priority, status, assignee, isAutomated, reporter, estimatedTime, labels, components, fixVersions, sprint, folders, updated, created, executed, flakyScore, passRateScore, aiGenerated, precondition, orderNo, seqNo, version. Example: ['key', 'summary', 'status', 'priority', 'assignee'] | |
| filter | No | Filter criteria — multiple fields are combined with AND; multiple values within one field use OR. | |
| startAt | No | Zero-indexed offset for pagination (URL query param). First page: 0. Second page: 50 (when maxResults=50). Default: 0. | |
| maxResults | No | Number of results per page (URL query param). Default: 50. Maximum: 50 (backend enforced). To page through results, increment startAt by 50 until startAt >= total. |
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 |