search_test_cases
Search test cases in Zephyr Scale using TQL queries to filter by project, status, priority, and other fields. Supports pagination and field selection.
Instructions
Search Zephyr Scale test cases with a TQL query (GET /testcase/search). Returns { startAt, maxResults, count, isLast, values }; isLast is the heuristic count < maxResults. Paginate with startAt (default 0) and maxResults (default 50; the API server-side default is 200).
TQL quick reference:
Test case fields: projectKey, key, name, status, priority, component, folder, estimatedTime, labels, owner, issueKeys + custom fields (field name in double quotes).
Test run (cycle) fields: ONLY projectKey and folder.
Operators: =, >, >=, <, <=, IN; the only logical connector is AND (no OR).
Syntax is strict: spaces around operators are mandatory, string values in double quotes. Folder paths start with "/" ("/" is the root). For single/multi-choice custom fields '=' does not work — use IN.
Examples: projectKey = "PROJ" AND status = "Draft" AND priority = "High" projectKey = "PROJ" AND folder = "/Regression/Payments" projectKey = "PROJ" AND labels IN ("smoke", "ui") projectKey = "PROJ" AND "My Field" IN ("Value") key IN ("PROJ-T50", "PROJ-T90") projectKey = "PROJ" AND issueKeys IN ("PROJ-5")
Note: queries longer than 1500 characters (typically large IN lists) are automatically sent via POST /testcase/search, which is RESTRICTED to the fields projectKey, key and name, and to at most 2500 values in an IN list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | TQL query, e.g. projectKey = "PROJ" AND status = "Draft" | |
| fields | No | Return only these fields, e.g. ["key","name","status","testScript"]; sent to the API as a comma-separated list | |
| startAt | No | 0-based index of the first result to return (default 0) | |
| maxResults | No | Maximum number of results to return (default 50; the API server-side default is 200) |