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

Unable to map SECTION DEPTH field when doing CSV Import of test cases


#1

When I do a CSV import of test cases in Testrail, I am unable to map the SECTION DEPTH (it just is not there) to anything, and that is causing a lot of headaches, since it just puts them on the topmost level. The field is indeed in CSV, but for some reason it is not being taken into consideration at all.

Can you fix it please?


#2

Hi Michal,

Thanks for the post! If you are looking to import sections and subsections, this would be handled in a single field and you wouldn’t need to map a ‘depth’ value for the sections. Instead, you would use > to identify depth between sections, such as:

Top Section > Sub Section #1
Top Section > Sub Section #2 > Sub Section of #2

You can review additional documentation for this here:

http://docs.gurock.com/testrail-userguide/howto-import-csv#column_mapping

Hope this helps!
Jon


#3

Hello John,

Unfortunately your response is not helpful at all.

I got the snippet of data from using CSV export option in Testrail. Everything went fine, the file is valid and such.
TestrailIssue

But when I try importing the CSV back in into Testrail Cloud, the section parameters are not used at all, and all three sections from my example end up on top-most level of sections.

If you are saying, that the sections depth/hierarchy will get recognized automatically during the import process, it is not the case at all.


#4

Hi Michal,

Thanks for the feedback! It appears you are tying to import your test cases into existing sections. Currently, the CSV import method wouldn’t support importing into multiple existing sections with the same import, as this would always create a new section as part of the import process. Section names aren’t required to be unique, and we have many teams that have duplicate section names within the same project/test suite, so the importer has been designed to always create new sections with each import if the section field/column is included.

You would only be able to import into a single section at a time with the import tool, and depending on the number of sections you have this may be the best option. You would simply leave the section column unmapped during import, and use the 'Import To" field on the first page of the import to specify the section you want to import to. This would require you to split your CSV file in to separate CSV files per section import.

Alternatively, you can import the test cases as-is with the new sections being created, and simply move the test cases using the drag&drop feature (deleting any duplicate sections afterwards). We also have plans to review adding support for importing into existing sections for a future update to TestRail.

I hope this clarifies the issue you are experiencing.
Jon