Importing Test Cases from Excel File
Overview
You can import Excel files that contain multiple sheets. By selecting the Create folder with sheet name option, you can create a new folder for each sheet, and the requirements will be imported accordingly.
For example, if an Excel file has 30 sheets, the import process will create 30 folders based on the sheet names. The corresponding requirements will then be placed into each respective folder.
The Import Test Case feature supports two distinct templates:
Test Case with Test Steps in Single Row
Test Case with Test Steps in Multiple Rows (steps in individual rows)
The import wizard imports test cases directly into the folders or sub-folders of the Test Case modules under the current project.
The import process follows the same order as the Excel file. Here are some reasons for this approach:
Test cases are ordered to produce the most efficient test flow. Hence, the QA Manager wants the test case import order to match the Excel sheet.
A user creates a series of test cases in a logical order to be tested, one after another- and after creating those test cases the users want to import the excel file with the test cases in the same order as they are found in the excel file allowing them to be easily added to a test suite in the same order.
Note
Best Practice: To carry out the import process smoothly, it is recommended that the size of file you upload should be a maximum of 10 MB.
First Time Importing of Test Cases from Excel File
First Time Import is when the organization does not have test cases in QMetry and they import test cases for the first time. This Import is the creation of test assets for the first time. Import always creates version 1.
Convert Test Case data into QMetry Format
Download either of the Test Case templates provided below.
Fill the template with your test case data. Enter comma-separated values for fields with the multi-lookup list. Make sure that all the columns in the Excel file have a corresponding field in QMetry.
The columns in the Excel file should map to one of the QMetry fields. If there are columns that don’t map, define those additional fields as Manage Fields in QMetry from the Manage Fields section in Administration.
The import will exclude any Graphs, Filters, Merge Cells, and HTML Tags that exist in the Excel file.
Steps to Import Test Cases in QMetry
To import test cases from an Excel, perform the following steps:
Go to the Test Cases module.
Click on the cog icon on the toolbar and select Import.
It opens the Test Case Import wizard, showing the following three stages of import:
Upload Source File
Map Fields
Select Import Folder
Step 1: Upload Source File
Before uploading the Excel file to import, define the format of the test steps that exist in the file. Select either of the following options:
Test Case Steps in Single Row: A test case has multiple steps, and all the steps are listed in a single row.
Test Case Steps in Multiple Rows: A test case has multiple steps, and each step is written in a separate row.
Note
If you receive an “Invalid file” message while uploading some Excel file formats, then open the file in Microsoft Excel and save the file as type “Excel Workbook” with a different name. After that try to import the newly created file.
Browse the file and upload it to import.
The file name appears adjacent to the Choose File button.
Select XLS Sheet: All the sheets that exist within the file are displayed in the drop-down. Select at least one sheet that contains test cases that you want to import. You can also select multiple sheets.
Importing Multiple Sheets: While importing multiple sheets, the field columns for field mapping are selected from the first sheet. For a successful import, ensure all the sheets have the same columns and format.
Header Row: Mention the row number that is considered as a header row so that all rows after that header row can be imported.
Click Next.
Step 2: Mapping the Fields
The fields from the Excel file are listed under Sheet Field, while the corresponding fields in QMetry are shown under QMetry Field. Map each field from Excel to QMetry. Mandatory fields for mapping are highlighted in red.
Removing the Mapping Between Fields
You can remove the mapping of fields one by one. To remove a single field mapping, open the QMetry Field list and select the Select QMetry Field option on it.
Step 3: Save Mapping
Before moving on, save your mapping to avoid repeating the same steps when re-importing requirements with the same file format. Click the Save Map button and give your map a name.
Additional Mapping Options
Auto Map: This option maps the system and custom fields automatically by using keywords in the header names.
All Mappings: The drop-down lists out all the mappings saved by the logged-in user while importing test cases. If there is a Map Name in the drop-down, then it shows the mapping currently applied.
Click Next to proceed to the next step for import.
Step 4: Selecting the Import Folder
Select a destination folder to import the test cases. The Selected Path shows the destination folder path as soon as you select the folder in the tree.
To create a new folder, first select the location, enter the folder name in the text box, and then click on the Add Folder button.
Create a folder with the sheet name: It creates a new folder for each sheet within the file, and import test cases into the respective folders. It eases the identification of Excel sheets to which the test cases belong.
Import with Warning: It helps import test case(s) with Summary that exceeds 255 characters by truncating it to 255 characters. Select the check box to import test cases even with larger Summary. If the check box is not selected, the entire import will fail if there are test cases with Summary exceeding 255 characters.
Click Finish to complete the Import wizard and start the import process.
After completing the import wizard process, the import will be scheduled. An Import Scheduled message will pop up, and you can view the progress in the notification window on the application header.
This allows scheduled imports to run in the background and allows you to continue with other work.
Refer to Notification Window for Import Progress for more details.
Importing Test Cases Containing Linked Shareable Test Cases
Note
Pre-Condition: The Shareable Test Case should already exist in QMetry.
For test cases with linked Shareable Test Cases, the following additional fields must be included in the import file:
Shareable Test Case Entity Key.
Shareable Test Case Version Number.
Download Templates
Shareable test case steps get created as part of the independent test case in the following scenarios:
When the Shareable Test Case Key or the Version is Invalid.
When the Shareable Test Case Key or the Version is Archived.
When the Shareable Test Case Key is for another project, and you do not have access to the test case.
Note
The Shareable Test Case Key and Shareable Test Case Version Number fields can be mapped or unmapped during import.
Any change in the content of shareable test cases will be ignored during the import. QMetry will match only the key and the version.
Re-importing Test Cases from an Excel File
You can export test cases from QMetry, make required changes, and re-import the file into QMetry. This re-import will update the existing test case details in QMetry. Re-import of test cases allows users to do bulk modification of already created test cases via excel. Re-import increases the existing version by 1.
You can export test cases through Bulk Operations which provides options to Export as XLSX and Export as CSV.
Refer to Exporting Test Cases for more details.
Steps to Re-import Test Cases
To re-import test cases, perform the following steps:
Step 1: Upload Source File
Before uploading the Excel, define the format of the test steps that exist in the file.
Select test case step format
Select either of the following options:
Test Case Steps in Single Row: When a test case has multiple steps, all the steps are listed in a single row.
Test Case Steps in Multiple Rows: When a test case has multiple steps and each step is written in a separate row.
Note
If you receive an “Invalid file” message while uploading some Excel file formats, then open the file in Microsoft Excel and save the file as type “Excel Workbook” with a different name. After that try to import the newly created file.
Browse the file and upload it to import. Select at least one sheet of the Excel file.
The file name appears adjacent to the Choose File button.
Mention the row number as a header row so that all rows after that header row can be imported.
Sheets that exist within the file are displayed in the Select XLS Sheet box.
Select the sheet that contains the test cases that you want to import and click Next.
You can also upload blank columns or headers or sheets.
Step 2: Mapping the Fields (Mandatory and Optional)
The fields in the Excel file are displayed in the Sheet Fields box, and fields in QMetry are displayed in the QMetry Fields box.
Map the fields from Excel and QMetry one by one.
For the Sheet Field at left, select its best match from the QMetry Field.
Fields that are mandatory to be mapped:
Entity Key should be mapped with Entity Key
Summary and all mandatory fields.
If there is no change in the Folder Paths, prefer not to map it. Map only if there are changes to the folder path, and you want to move assets from one folder to another.
Fields that are not mapped will be picked from the previous version.
Removing Mapping Between Fields
You can remove the mapping of fields one by one.
To remove a single field mapping, open the QMetry Field list and click the Select QMetry Field option.
Step 3: Save Mapping
Before moving on, save your mapping to avoid repeating the same steps when re-importing requirements with the same file format. Click the Save Map button and give your map a name.
Additional Mapping Options
Auto Map: This option maps the fields automatically by using keywords in the header names.
All Mappings: The drop down lists out all the mappings saved by logged in user while importing test cases. If there is a Map Name on the drop-down, then it shows the mapping currently applied.
Click Next to proceed to the next step for import.
Step 4: Selecting the Import Folder
A. Select a destination folder to import the test cases.
B. The Selected Path shows the destination folder path as soon as you select the folder. To create a new folder, select the location and click the New Folder button. Enter the Folder Name and click the " + " icon.
Click Finish to complete the Import wizard and start the import process.
After completing the import wizard process, the import will be scheduled. The Import Scheduled message will pop up, and you can view the progress in the notification window on the application header.
This allows scheduled imports to run in the background and allows the user to continue with their other work.
Reimport Test Cases Containing Linked Shareable Test Cases
During reimport, a new version of the independent test case is created, preserving links to the Shareable Test Cases while applying changes from the Excel file.
The rest of the process is the same as outlined in Importing Test Cases Containing Linked Shareable Test Cases.
The shareable test case link remains intact as shown in the image above. You can click on the entity key to access the shareable test case.
Note
The Shareable Test Case Key and Shareable Test Case Version Number fields can be mapped or unmapped during import.