Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Search performance


Is there a way to increase search performance on our server?

When we perform a search string using the bar on the upper right of TestRail, it takes TestRail 30 seconds to return the results. We now have more than 500,000 test cases, but in reality, we only have about 5,000 active (open) test cases, but we’ve created and closed so many test plans because of how we schedule our nightly automations (our automations create a test plan on a daily basis and we close them daily). From the looks of it, our test cases get duplicated each time we close our test plans.

If it can help increase the search speed, we don’t want TestRail to search in closed test plans to look only in our active (open) test cases to return results in a faster timely manner.

It’d be even better if we can ask TestRail to not look into the test results… just the test cases.


Hello Adron,

Thanks for your posting! Starting with TestRail 4.2, the search scope can be customized via TestRail’s config.php. You can tell TestRail to ignore test results for the search by adding the following to your config.php:

define('DEPLOY_SEARCH_TESTS', false);

Other supported values are DEPLOY_SEARCH_CASES, DEPLOY_SEARCH_MILESTONES, DEPLOY_SEARCH_RUNS and DEPLOY_SEARCH_SUITES. Disabling the tests/results usually has the most impact though. TestRail also wouldn’t search internal case copies (for closed runs/plans) and only the 5,000 active/open test cases in your example.



Uh wow!!!

Putting that line in my config.php reduced the search time from 30 seconds to 8 seconds! :smiley:

Thank you!!! :smiley:

You guys rock, tgurock! :slight_smile:


You are welcome, Adron, and great to hear that :smile: