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

Adding test run using API using filters

Is it possible to create test run using api by specifying the filters or is there a way specify the section is so all the testcases in that session gets added to test run?

thanks

Hi,
afaik you can create a run with all cases from the suite or you have to provide the case_id’s.
The case_id’s are e.g. fetched via get_cases for the given suite (and project).
For some/most of the internal fields you can provide filters, only if want to filter by custom field(s) you need to do so programmatically. This is basic stuff, but probably needs some additional calls…

Just how I would do so…

Regards
Karsten

1 Like

@ramavijay

Hey Rama,

Welcome to the TestRail Community and thanks for your post.

Please refer the below mentioned API documentation for more information on creating a run using API.

https://www.gurock.com/testrail/docs/api/reference/runs

Let me know if this helps !

Regards,
Shanu