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

Updating 'Test Run' suite all test cases status to 'Retest' using API


I am integrating TestRail to my Selenium Automation project. My idea was first I will reset all my test runs status to ‘Retest’ (using automation) and then start test script execution. So that previous results should not effect my current run results.



I have same question. Did have any ways to make it come true?



Hi @safe,

If you would like to use the API to update all of your test statuses to retest, you can accomplish this in bulk using the ‘add_results’ or ‘add_results_for_cases’ methods.

You can also create a new test run which would have all tests marked as ‘Untested’ until results are added.

I hope this helps,

1 Like


@jon.reynolds Thanks for your reply.

‘add_results’ can make it right, but as I know, it need to define each case id in API request. If you have 100 or more cases in a Test Run, It will become a tough work…



Hey @safe ,

For executing larger test sets in bulk you would likely need to create a script that combines different API methods. For instance, you could use the get_tests method to retrieve all of the test IDs in a single run, then feed that into the add_results call, which would effectively update all tests within a run at one time. If you’re using the add_results_for_cases method the same get_tests call will return the case ID values for tests in a run.

I hope that helps!

1 Like