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

TestRail DB: Case table data grows on every time we close test plan


Recently we noticed executing any query on case table takes more than usual time. When we looked at the data, it looks like case table have millions of records against actual valid cases (It happens when ever we close our test plan, it logs underlying cases ).

–Total record/valid cases -:4973396/45150

By looking at the above number, we are little worried as once team start closing their plans, it might impact the UI as well. Please suggest how this can be handled to avoid any future impact?


We are having the same problem. I did some investigation of the database and discovered that TestRail creates a test in the tests table for every test case when creating a test run. I added 1 test case to a test run and the table was populated with all the test cases.

I also found that when I close a run, TestRail makes a copy of the content for every test case in the cases table.

Our performance continues to degrade, especially when we close a test run. We only have 13 thousand test cases, but there are over 17 million records both the cases and tests tables.

Is this a known bug? This can’t be working as designed.