User can create multiple test-cases at a time using CSV or XML file. CSV files are comma separated text files. There are 2 steps processes require to import the data from excel.
While creating CSV file following point must be considered
CSV file should have data in the first sheet only.
1st row should have headers name in different columns and next onwards data should represent each column.
Please note, 1st row will be mapped with different fields of Test Case Forms while importing.
1 column in excel file can be mapped with only 1 field in test case form.
Required fields must be mapped with column of CSV sheet and it shouldn’t be blank. Otherwise, system will generate error message of unsuccessful import.
Non-Required fields can be left without mapping or data can be blank. While importing either these fields will be blank or default values as defined in project’s settings.
Go to Test Cases tab.
Click at import test cases icon at right side and select Import from CSV option. Following screenshot shows Import test cases icon and CSV selection
Import from CSV Wizard opens. It has 4 steps process.
In the 1st step, browse the CSV file and upload. After successful upload, filename displays in wizard.
In the Format & Mapping section, select Configure new mapping for the 1st file. User can use the same configuration from next time after downloading configuration file. To use this option select Load mapping from configuration file.
Following selection should be made in Advanced Option section
Import − to Select the section where test cases should be imported
File Encoding − It is used t select the encoding rules of file so that TestRail can decode file properly. The file encoding of the CSV file, Excel/Windows uses Windows-1252 (Latin) for CSV files whereas most other tools (including Google Spreadsheets) prefer the Unicode-compatible UTF-8 encoding.
CSV Delimiter − User can define , or ; or \t to separate fields.
Start Row − User can separate header row and data row from where starts. And, IS header row or not can be decided using checkbox.
Template − User can choose whether it is complete test case or steps or exploratory session.
After these selection, click on Next button. Following screenshot shows 1st step of import test cases process
User can simply map CSV columns to TestRail’s test case fields. TestRail also supports importing separate test steps and expected results if user uses multiple rows for a single test case. This is called as column mapping and can be configured on step 2 of the CSV import wizard.
TestRail differentiates single and multi-row case layouts for CSV files. In a single-row layout, every test case is represented by a single row or record in the CSV file. This is the standard layout for most CSV files.
TestRail supports multi-row layout. User selects the column which detects the start of a new test case in this case (for example, an ID or Name/Title column which is unique per test case). This layout is commonly used for test cases with multiple steps and expected results.
At the last there is a checkbox whether TestRail should ignore CSV rows/records without a valid, non-empty title column. It is recommended to check the checkbox to filter empty rows at the beginning/between test cases/end of the CSV file.
Now, click on Next button. Following screenshot displays 2nd step of Import test case process
This step is to map the CSV values to TestRail. For example, if user has a priority value of Medium in CSV file, this step allows to map this to a priority of Low or Normal in TestRail. In this step, user can check the checkbox to avoid any HTML tags as imported data.
After that click on Next button. Following screenshot displays 3rd step of Import test cases process
In the 4th step, user can review the test cases that TestRail found in the CSV file. User can review the file options as well as column & value mappings those are configured on the previous steps. User can go back and forth with the Previous and Next buttons to make changes to the file options, column or value mappings. Once user is satisfied with the preview, click the Import button.
The last wizard step shows number of imported sections & test cases. It allows to download a configuration file. This file can be loaded on the first wizard step and automatically pre-configures all wizard steps and import options. This is useful when multiple CSV files would be imported with a same layout. User can share this configuration file with other team members as well.