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

Feature Request : API call to add multiple suites/cases at once


#1

Hi,

I wrote a small app to import my suites and cases from CSV to TestRail project. When I have 20-30 suites and 900 cases, It has to make API call to import every case and it takes long time.

Having an add_suites/add_cases call and passing JSON array of suites/cases would be helpful.

I didn’t see any support to insert multiple suites, cases. Is there anything like this or to add in next release?

Thanks


#2

Hello,

Thanks for your posting. This feature is currently not available unfortunately but I’ve added it to our feature request list for now (thanks for the suggestion!). For CSV files, you could also look into using TestRail’s XML import with our CSV migration tool instead:

http://docs.gurock.com/testrail-admin/migration-csv

That said, using the API is more flexible and the better solution for more complex requirements/scenarios.

Regards,
Tobia


#3

Thanks, that would be nice to have in future. This script won’t help because in my script I am also importing suites

Thanks


#4

Hi. I would like to second this request.

We have test suites with hundreds of sections, subsections, cases and steps that may total over a thousand API calls to import a test suite. This results in taking several minutes to open/parse and import complete test suite(s) and create a test plan or test runs.

The add_results_for_cases API call, where you can pass in a JSON array with multiple test results is very handy for us. It would be great to have something analogous at other levels (add_sections_to_suite, add_cases at section, etc.).

And the ideal call would be something line “import_test_suite” that would take a JSON that contained a complete suite.

Thx


#5

Hello,

Thanks for your reply. I’ve added another vote to this request, thanks! We understand that this can be quite slow if you have many test cases to import and we will make sure to look into this. You can alternatively generate an XML import file and import this via the standard import feature in the UI. Would this also work for you?

Regards,
Tobias


#6

Hi Tobias,

Is there a way to launch an automated XML suite import into a project? Could we construct a URL that connects securely with TestRail and starts an XML import from a Java client running on a remote server?

In addition, I am a little hesitant to suggest this after winning an internal battle to standardize on JSON format for all inter-process communication :wink:

Thx,
John McCullough


#7

Hello John,

That’s currently not really supported unfortunately. While it would be possible to use the import functionality available via the UI outside of a browser, that’s not something we can recommend currently. There are various reasons for this. For example, the authentication would be difficult because it uses session cookies. Also, the endpoints of this feature are considered internal APIs only and they may change from one version to another.

We recommend using the official API for now and we will look into adding an add_cases or similar API method to a future version.

Regards,
Tobias


#8

any update now?
Can I add multiple cases once instead of add case one by one now?

Thanks.

Alston


#9

Hello Alston,

Thanks for your posting. There’s currently no API for this but it’s still planned to look into this. You can already use the bulk-edit features in TestRail’s UI if you want to update multiple test case in one step:

http://blog.gurock.com/postings/introducing-testrail-4-0/2757/

Regards,
Tobias


#10

Still couldn’t find the API endpoint to add multiple cases at once.
It’s really a pain to call API for each case insertion.


#11

Thanks for your feedback, Dinesh! Happy to add another vote to this feature request.

Cheers,
Tobias


#12

Hi there

I am waiting for this feature as well. It could be a great improvement for TestRail API.
Looking forward to hearing from you,

Nadia


#13

Thanks for your feedback, Nadia!

Cheers,
Tobias


#14

Hello Tobias,

+1 for an add_cases, I do prefer using the API rather than using any import/export using XML or CSV.

Do you know if you will work on it or if you have already started when will it be ready?

Regards,

Raja


#15

Hi Raja,

Thanks for your feedback! We currently don’t have a time frame or estimate unfortunately but it’s still planned to look into this.

Cheers,
Tobias


#16

Any update now??

Thanks.

Raphael


#17

Hi Raphael,

Thank you for the post. We currently do not have an ETA on this. I would recommend keeping an eye on this post as well as checking our blog for new releases. You can view that here:

https://blog.gurock.com/tag/testrail-release/