Test

Search active test references by full-text token query.

Changed on

Token-based full-text search over a workspace's active tests, using the Spanner SEARCH() function. A test is matched on its own name, description, intent, and labels through idx_test_reference_search_v2; the default "combined" search covers all four at once, and restricting search_field scopes the match to that one column. The combined search also matches on the step text of a test's flows, through idx_flow_reference_search_v3, so a test whose steps describe the query is found even when its own name, description, intent and labels say nothing about it. Step matches rank below every metadata match rather than competing with them; see match_source for the tier rule.

Returns rich per-test rows, including an excerpt of the annotated step descriptions of the test's flows (joined through test_reference.flows -> flow_reference). Under the "combined" search a flow whose steps matched contributes a window of its step text around the matching steps, a flow that did not match contributes its opening steps, and the flows are ordered most relevant first, so that a capped excerpt keeps the steps the query was about rather than whichever flows happen to run first. Shaping the excerpt decides only which steps a row shows: it never admits a test, and never changes how the returned tests rank.

The query follows Spanner search syntax — multi-token queries default to AND. Callers can join keywords with " OR " for broader recall, or quote phrases. OR binds only the two words beside it and parentheses do not group terms, so prefer one plain multi-word query (all words required) over mixing OR with other terms.

post/test/references/search

Request

  • Base URL: https://api.mabl.com
  • URL: https://api.mabl.com/test/references/search
  • Auth: one of:
    • HTTP basic
    • API key in header Authorization

Query parameters

workspace_idstring required

The workspace to search in.

Request body

querystring required

Token query. Multi-token defaults to AND; join with " OR " to broaden recall (e.g., "login OR signin OR authentication"). Adjacent tokens are treated as a phrase. Empty query returns zero rows.

search_field'combined' | 'name' | 'description' | 'intent' | 'labels'

Which tokenized columns to search. "combined" searches name, description, intent and labels together; use a single field name to scope the match to that column alone. Only "combined" orders a test's step excerpt by relevance to the query — a scoped search leaves the excerpt in test order.

application_idstring

Optional. When set, results are scoped to the application using the same four-leg association logic as semantic search and GET /test/references/by-application, rather than the test's training-time application alone. A test is in scope when any leg holds: it belongs to a plan resolving to this application, it was trained on this application, it ran against this application within the last 90 days, or it has no training-time application and belongs to no application-resolving plan. That last leg treats such tests as belonging to every application — a deliberate recall aid — and does not consult run history, so a test whose only runs were against a different application is still in scope. Workspace scope is always the hard boundary.

test_type'api' | 'browser' | 'performance' | 'mobile'

Type of test

mobile_platform'android' | 'ios'

The mobile platform associated with this object

label_filterstring[]

Exact-match label filter. When set, only tests whose labels array contains every entry in this list are returned. Max 20 entries.

updated_afterstring date-time

Optional. Only return tests with last_updated_time >= this timestamp.

limitinteger required

Per-call hard limit. Capped at 200 server-side.

Response

Search results ordered by relevance score (descending).

truncatedboolean required

True when the 20000-character cap cut any match's step text, at either level: a single flow past it, or a test's flows past it once joined. Independent of the excerpt window. Derived from the per-match annotated_step_truncated flags. The agent-side adaptive truncation re-truncates against a total tool-response budget.

Changes