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

Closing test plan after some period of time


#1

Hello,

we are looking for possibility to close active test plan automatically and we want to close it if there were no changes by some time (e.g. 1 month)

I was searching the API and I do not see any method which would return last activity time.
So if there any chance to get that data w/o connecting directly to testrail database?

Thanks.

Regards,
Mariusz Rakowski


#2

Hello Mariusz,

Thanks for your posting. You can do this with the API as follows:

[list=]
[
]Call get_plans with an is_completed filter set to false.[/]
[
]For each plan, call get_plan to get a list of test runs.[/]
[
]For each run, call get_results_for_run with a limit of 1 to get the latest result. If you don’t find a result across all test runs that is younger than a month, you can close the test plan.[/*]
[/list]

I hope that works for you!

Regards,
Tobias


#3

Hello Tobias,

Thank you very much as always.

I have one more question:
do you plan to support testrail reports with the API?

Regards,
Mariusz Rakowski


#4

Hello Mariusz,

Thanks for your reply. Yes, it’s planned to support this eventually. You can already schedule recurring reports via TestRail’s UI but being able to schedule/create reports via the API is also planned.

Regards,
Tobias