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

Import multiple suites


#1

Hello,

I was looking into possibility of migration from the old test management tool to TestRail. I have a csv file from the old tool and already prepared a filter for conversion into TestRail XML import format. However I see that in TestRail I can only import one suite at a time. Since the number of test suites we have is quite big, importing each xml manually one by one might be very inefficient.

I could use REST API to import all those tests, but maybe there is some way to import one XML for the whole project I don’t know of?

Thank you in advance.


#2

Having not received a response in one business day as claimed, found a work-around myself that doesn’t involve importing every case by REST and creating groups. The work-around uses cURL to simulate ajax_import actions on the page using my cookies and CSRF token.

However an option to import/export the whole project as XML would generally be very nice to have.


#3

Hello Actine,

Thanks for your posting and my apologies for the delayed response. Yes, you can only import one test suite/XML import file at a time. You could either use the API to automate this (or call the import function as you did) but you could also have just “merged” the XML import file into bigger files and then import those in one/fewer steps. We usually recommend using just a few test suites per project and it can even make sense to use a single test suite (depending on the project size and granularity of the test cases).

Regards,
Tobias


#4

Thank you for response. I anticipated that there were no other way, so just went forward.

Well, we have quite plenty of tests and plans and a very big project, so combining those wouldn’t be an option since some plans (suites) already have more than 400 cases. To use REST API it would require to convert all objects parsed from CSV into REST DTO’s, take care of sections ourselves, and send thousands of requests to put each test case. So analyzing the traffic for how import requests are formed and sending them programmatically appeared to be an easier option.

Just sharing for others to know.


#5

Hello Actine,

Thanks for the additional details. Using fewer test suites might still make sense and TestRail has a special view mode for larger test suites (compact view mode). The view mode can be toggled with the yellow icons in the toolbar of the test suites. The compact view mode shows a single section at a time only, making it ideal for larger suites/runs with many test cases and sections:

Using fewer test suites has several advantages when creating test plans & runs, e.g. for filtering purposes. It’s also easier to create reports that cover a larger portion of your test case library (e.g. result coverage reports on the Reports tab).

Regards,
Tobias