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

Creating run with multiple suites using testrail api's

Hi,
Is it possible to create test run with multiple suites?
I saw, add_run api takes suite_id and returns run ID, suite id is int fileld, means only one suite id is allowed to add_run api correct?
Also, update_run api will update few fields of created/existing run, and not allows to add suites to existing run is it?
My requirement:
I have 4 suites, s1, s2, s3 and s4
Using add_run api, i can pass only suits_id s1 to create run.
Actually, i want to create run to include suites s1, s2, s3 and s4.
How to do this?
i know its possible manually, but want to automate using testrail API.

Thanks,
Ajay

Hi Ajay,

Thanks for the post. It’s not currently possible through the UI or API to set up a test run that would include test cases from different suites. As you mentioned, when using the API you are required to enter a suite ID, and when setting up a test run in the UI with a multiple suites project, it will prompt you to select the suite the test cases should come from. This is intended behavior, and is why in most cases we would generally recommend using the single repository project type, as it does allow creation of test runs with any and all test cases within a project. It is possible to convert an existing multi-suite style project to a single repo if you’d like, but you will need to use the copy/move option to first consolidate all test cases into a single repository before converting. You would also need to close any active test runs prior to moving the test cases to prevent the tests from being removed from the runs, potentially losing added results during test execution.

I hope that clears things up! Let us know if you have any other questions.

Thank you Scott…

1 Like