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

Is there a possibility to close multiple test runs in one go?


#1

Hi All,

I have a lot of test runs and plans created over a period of time. I would like to close all my test plans/runs in one go.
Is there a possibility to bulk edit test runs and close them?

A quick response would be appreciated.

Thanks a lot.

Best Regards,
Sanat.


#2

Hello Sanat,

Thanks for your posting. Closing multiple test runs in one step is supported if they are organized/grouped in a test plan (you can then simply close the test plan). Closing multiple standalone test runs in one step is currently not supported but it’s already planned to look into it. If you many test runs/plans to close (e.g. hundreds), you can also look into using TestRail’s API to close the runs/plans programmatically (I’m happy to provide the steps in this case).

Regards,
Tobias


#3

Thanks for the reply Tobias. Will try it via the API for now. But really looking forward for this feature.

Best,
Sanat.


#4

You are welcome, Sanat!

Cheers,
Tobias


#5

Please add +1 vote to it

Cheers,
Aleksandra


#6

Added, thanks Aleksandra :slight_smile:

Cheers,
Tobias


#7

+1

This feature would help a lot!


#8

Thanks for your feedback, Christian!

Cheers,
Tobias


#9

Please add +1 to the vote


#10

Thanks, Dio!

Cheers,
Tobias


#11

+1, would be very useful here too


#12

Thanks for your feedback, Chris!

Cheers,
Tobias


#13

Hi Tobias,

I saw above that you said there is a possibility to close several test runs at once using TestRail API.

“If you many test runs/plans to close (e.g. hundreds), you can also look into using TestRail’s API to close the runs/plans programmatically (I’m happy to provide the steps in this case).”

Could you help me with that? We have a lot of opened test runs and I planned to implement functionality that will be triggered every week and will close all test runs older than i.e. two weeks. Is that possible?

Thanks, Wojtek


#14

Hi Wojtek,

Thanks for your posting. Yes, that’s possible and the steps would look as follows:

  • Get a list of test runs older than two weeks: if you can use the creation date of the run/plan for this, you can simply use get_runs/get_plans with a created_before filter
  • Once you have the list of runs/plans, you can close each run/plan with close_run/close_plan

http://docs.gurock.com/testrail-api2/reference-runs
http://docs.gurock.com/testrail-api2/reference-plans

Please note that closing runs/plans cannot be undone and prevents future modifications so this should only be implemented for finished runs/plans. If the creation date is not sufficient to determine if a run/plan is finished, you can also get_results_for_run (with a limit of 1) to get the latest result per run and compare the timestamp of this result to see if the run/plan might still be active:

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

Cheers,
Tobias


#15

Please add my vote to this request - I would really like to have the capability to “bulk close” test runs.


#16

Hi Srau,

Thanks for your feedback! I’ve added your vote to the request.

Regards,
Marco


#17

+1 please on the ability to close multiple test plans/runs at one time.


#18

Hi Jan,

Thanks! I’ve added your vote as well.

Regards,
Marco


#19

My team of 6 votes for this feature as well :-). so +6 for this from my organization.

Kathleen