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

API to reset test runs test cases to untested


#1

Is there a way to use the API’s to reset all the test cases in a test run to untested before an Automation script runs?

I would like to create a Regression Test Run that is used all the time. I need the test case status reset before Automation and Manual testing starts on the test run.

Please advise how I can accomplish this.

Thanks,
Herb


#2

Hello Herb,

Thanks for your posting. You can generally use the add_result API methods to change the status of a test (ideally one of the bulk methods if you plan to update multiple tests):

http://docs.gurock.com/testrail-api2/reference-results

Setting a test back to Untested is not supported as this is used for the initial status of a test only. We usually recommend setting a test to Retest in such situations. You can alternatively add a custom status under Administration > Customizations. Another alternative would be to create a completely new test run or plan via add_run or add_plan (which would use the Untested status then).

Regards,
Tobias


#3

Tobias,

Thanks for the reply. The problem I face is that I want a Test Run that is static, that is used for nightly regression tests. This regression suite can have new tests added to it from time to time or removed. It would be much easier if an API was built to reset all TestIds iin a TestRun without defining each testid/testcase.

I understand your API do not support this currently, but I think it should be considered for future releases. Seems like a simple request.

Thanks,
Herb


#4

Hello Herb,

Thanks for the suggestion. I agree that this would make sense and we have other customers using a similar approach (using a static test run/plan for automated runs instead of new test runs/plans). We will make sure to look into this and I’ve just added this to our feature request list.

Thanks again,
Tobias