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

Tips for importing test cases from CSV file


#1

I have been piloting the tool, and found one undocumented feature.

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

The guidelines say:

What about sub sections? You can also import full section hierarchies from CSV files. To do this, you would simply specify all sections and sub sections in a single column, separate them with the greater-than character (>) and select the Section TestRail field. Like this:

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

If you do not have a white space after the top section and greater-than character, then the top section is ignored. So you may want to consider adding the white space in the correct place.

Luckily I am using sandbox projects, so learning by trial does not mess other data.

My first experiment failed, since hundreds of tests with subsections were imported to root level in the sections, and deleting all of them at once is not possible. But this can be avoided if there is a white space, or you add section manually and then import the data under that section.


#2

Hey Asmo,

Thanks for the tips and feedback! I’ve made a note of this and we’ll look into updating the documentation with your findings.


#3

I made this comment in another thread, as well.

Make sure you export the Section Hierarchy and match that with “Section”. No need to even import or map the Section column.


#4

Hi apetrone,

Thank you for posting! I have responded your comment in the other thread which was about importing test cases from a CSV file to a test suite under a section that already exists in the suite prior to importing the test cases. That said, while you are correct in stating it is possible export test cases with the Section Hierarchy column in the CSV file that contains the section > subsection structure, we do not recommend using the CSV export tool when the test cases will be imported again. We generally recommend using the XML export / import when exporting test cases from a TestRail instance that will be imported to another TestRail instance as this allows you to import individual test steps as separate steps and to update existing test cases.

I hope this helps!

Regards,
John