Intelligent Search: Finding Relevant Test Cases

Intelligent Search is a TestRail MCP capability available through the search_cases tool. It returns a ranked, scored list of the most relevant test cases.

Describe what you’re testing in natural language, and Intelligent Search helps your assistant find the right test cases in seconds - without manually scrolling through or filtering a large repository.

By retrieving focused, relevant results, Intelligent Search improves the context available for downstream workflows without requiring the TestRail API to return large amounts of repository data. This can reduce token consumption and API usage, lower costs, and allow the AI agent to spend less time searching and more time completing the task.

The TestRail MCP is currently available in closed Beta. To request access, please contact TestRail Support.

Important: It finds - it doesn't decide. Intelligent Search's job is to surface the best candidate test cases. It doesn't decide pass/fail, and it doesn't determine which tests you must run - think of it as a librarian who pulls the right books off the shelf; what you do with them is up to you or the workflow using the results. To evaluate whether a change actually breaks something, see Change Evaluator - it reasons over relevant test cases to predict pass, fail, or uncertain per case; it doesn't execute tests.

 

This is a closed beta. The TestRail MCP is available to selected teams while we refine it toward general availability. 

How Intelligent Search helps

Intelligent Search searches your entire TestRail repository using a combination of semantic and keyword-based search. It can find test cases that use related wording, while also recognizing exact terms such as error codes, API paths, and ticket IDs.

With Intelligent Search, your assistant can:

  • Search your entire test repository without you referencing individual test cases one by one
  • Find the most relevant test cases based on your prompt
  • Retrieve focused results without loading large amounts of repository data
  • Reduce token consumption, API usage, and associated costs
  • Spend less time searching and more time completing downstream tasks

When to use it

  • Coverage discovery - "What do we already test around subscription renewals?"
  • Finding related cases before a change - surface everything relevant to the area you're about to modify
  • Exploring an unfamiliar project - get oriented in a large repository by asking about a topic instead of guessing suite or section names
  • Using tests as context before a code change - surface acceptance criteria and regressions from existing test cases so your coding assistant can use them as guardrails before writing code

Writing a good prompt

Just like a precise search query beats a vague one, the more specific your prompt, the more relevant the results. A useful prompt generally identifies:

  • The feature or product area
  • The scenario you want to test
  • The relevant platform
  • Any error codes, API paths, or ticket IDs
  • The projects, suites, sections, or priorities you want to include

For example:

  • "Find test cases for checkout and payment flows for the Black Friday release. Prioritize refunds and declined cards on the web."
  • "I'm about to refactor the checkout API. Show me every test case that touches the payment or shipping endpoints."
  • "Show me high-priority test cases in the Regression suite that cover SSO login failures."

You can also refine conversationally — the assistant can filter the pool before searching (by suite, section, priority, or ticket) and exclude cases you've already ruled out. A follow-up like "Ignore the mobile ones and show me more" works as you'd expect.

Understanding the relevance score

Every test case Intelligent Search returns gets a relevance score from 0–100. Higher scores mean the case is more relevant to your current query, and results come back with the most relevant cases first.

Score range How to read it
90–100 Very strong match. Review these cases first.
70–90 Strong match, likely relevant to your query.
50–70 Moderate match that may still provide useful context.
30–50 Weaker match, less closely related to your query.
Below 30 Low relevance, or only a marginal match.

What the score doesn't mean:

It's tempting to assume… Actually…
"A score of 85 means an 85% chance this test will find a bug." No, the score says nothing about bug-finding probability.
"A score of 70 means the engine is 70% confident this is the right test." No, it isn't a confidence level.
"Anything above X is good, anything below is noise." Not quite, the score is relative within a single query. Use it to order and prioritize, not as a universal pass mark.

A few things worth keeping in mind:

  • Scores compare within one query, not across queries. A 72 and a 65 in the same result set are meaningfully rankable against each other; a 72 in one query and a 72 in a different query aren't.
  • The score is stable across pages - a case shows the same score no matter which page it appears on.
  • Weak matches may still appear. Intelligent Search returns everything it finds, including weak matches - you decide where to stop reviewing.
  • Results are deterministic. The same query over the same data returns the same cases, with the same scores, in the same order.

The core idea: a high score means a test case is more relevant to the current query — not that it's definitely the right test. Intelligent Search surfaces candidates; you or a downstream workflow still evaluate them.

Paging through results

A query can match hundreds or thousands of test cases, so results come back one page at a time, most relevant first. The ranking stays stable as you page through results — cases don't shuffle, disappear, or repeat between pages — and later pages load quickly even in large repositories.

Data use and privacy

Intelligent Search processes your test case content (titles, descriptions, steps) to return results. For TestRail's data handling, privacy, and legal terms, see Sembi's legal documentation.

Was this article helpful?
0 out of 0 found this helpful