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

[Automation]: Select specific test cases from test run and start tests



For my automation project I could trigger my scripts using TestRail. However, I did not get the way to select some specific test cases from test run and execute them.

I have followed Select specific test cases and run those *only when you hit "Run Automated Tests button" on Testrail Web UI (button created using UI script) link and noticed that it will work only from Test Plan page.

Is there any api similar to test_ids = App.Tables.getSelected($(’#groups’)); which returns selected test ids from Test Run page?. If not what would be the better way to achieve this?



Hello Ashweeja,

Thanks for your posting! The topic is actually about the test run page (not plans) and App.Tables.getSelected would return the list of currently selected tests on this page. The topic also explains how to pass those IDs to your automation script. On the script side, you can then use the test selection to look up the case IDs and pass a custom case selection to the add_run API call.

I hope this helps!