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

Sharing test cases between suites


Hello. I wanted to know how to share test cases between suites. I think we had this option before (but not 100% sure). Why do I need this? Becase we use automation in different environments, so we need to have multiple test runs with different test groups… but I need to use the same tests in different suites (or groups). Also, sometimes it would be good to use those tests for manual testing.

Is there any other option? Do test plans work for that?

I’m asking because in the “add_result_for_case” method there’s a suite_id param, and I used to use that when testing in the sandbox.



Hi Hugo,

Thanks for your posting! Sharing/linking test cases between test suites is not possible and we would usually recommend using just a single test suite if at all possible (TestRail 4.0 also introduced a new single-suite mode). Using a single suite has many advantages over multiple suites as it makes it much easier to create test runs for the entire case repository or an arbitrary subset thereof. I can recommend reviewing our 4.0 announcement from last year to learn more:

(see “Suite Modes and Baselines”)

The add_result_for_case API method also expects a run ID instead (and not a suite ID), so this method would be independent of the actual suite or case repository.

I hope this helps!



Hi Tobias,

The problem is that when I start a Test Run, the test run contains all the tests of the project.

add_result_for_case works well for us when the test passes, but the problem is: when testing only 1 suite, I’m able to see how many tests run and how many tests didn’t run (and that’s what I want). But when testing the whole project, I can’t difference between tests that didn’t run and tests that I wasn’t planning to run anyway.

Is there any way to specify a subset of all the tests when creating a test run?


So, the method I’m talking about is add_run. It seems that I can pass a parameter called case_ids, and specify a subset of all tests.

It would be nice to have something like a section_id paramenter, but I guess I’ll use case_ids for now.


Hi Hugo,

Yes, you can specify the case selection via the case_ids and include_all (-> false) options when creating a test run or plan. This allows you to limit and customize the selection of cases:

(see “Request example”)

I hope this helps and please let me know in case you have any further questions!