Importing Testcases

Testcases that are external to Zephyr can be imported by clicking on the Imported folder contextual menu and selecting Import Tests.

 

When importing testcases, please note the followe:

  • Only testcases in Excel formats XLS and XLSX are supported
  • Only the first tab is imported
  • Special formatting is not supported (merged cells, formulas, etc.)
  • If importing in bulk, all source testcase files need to be located on the same machine on which the Zephyr server is installed or on mapped/network drives. If source testcase files are located on the same machine on which the Zephyr server is installed, then the import process should be run only from a desktop launched on the server machine. If located on mapped/network drives, care should be taken to enter the appropriate path correctly
  • Individual files can be imported from a user's local machine
  • Three discriminators supported to demarcate testcases: ID change, Name Change, or a blank line between testcases

Import Overview

Importing test cases into Zephyr involves the following steps:

  1. Creating a map for the fields in source files and saving that map so it can be reused
  2. Creating an Import Job that points to one or more source files, the test case separator (called a "discriminator"), and the line number from where to start from the source and Save
  3. Run the Import Job. A historical log section shows the progress and success. If import fails, the log will point out where a fix is needed and then you can re-run the job


Importing test cases from a set of source files that have been manually created by multiple users can be fraught with frustrations and failures. We suggest standardizing these source files as much as possible in order to make it easier for importation.
 
Once imported, the test cases can be found under the Imported directory of a release from where this importing was done. The directory is labeled with the date and time stamp of when the import job was run. This can be renamed to some relevant name. These test cases can then be dragged-n-dropped anywhere else in the Test Repository. This will move the test cases. If you want to copy them, hold the Ctrl key down while performing the drag-n-drop operation.

Import Wizard

Copying the Excel files to the Zephyr Server or locate an individual file on the user's local machine:
          1. For hosted SaaS users, please use the File Manager (http://<servername>.yourzephyr.com/filemanager) to upload the Excel files into the Imported directory

Running the Import process

The Import wizard can be run from the testcases application. Select Import Testcases from the Imported folder. The process of importing testcases involves the following steps:

  1. Creating a Map
    1. Create a mapping of the columns in the Excel file to the appropriate fields in Zephyr (which are Name, External ID, Priority, Created By, Created On, Attachment, URL, Details). This mapping can then be applied either to a single Excel file or multiple Excel files for bulk import
    2. Identifying which row in the Excel file the actual testcase begins from since there might be some header rows that need to be ignored
    3. Selecting a discriminator that allows the import process to distinguish between multiple testcases, possible discriminators are: "By empty row", "By ID change", or "By testcase name change"
    4. Give the mapping a name and Save
  2. Creating an Import Job and associate it to a Map
    1. Create an import job which involves selecting a map as created above, selecting a single Excel file or a directory of Excel files, and saving the job
    2. Select a job name and then select a map from the drop-down menu
    3. Enter the path for where the file(s) are located. If importing a single file from the user's local machine, select Browse. For SaaS users, please enter "/usr/local/zephyr/ftp/import" as the path
    4. Save the job
  3. Running an Import Job
    1. A saved job shows up in the grid above with a Run button next to it. Click on the Run button to kick off that import job
    2. The Excel file gets normalized and imported and the history window shows the progress of this process.
      1. If the status is displayed as "imported successfully", then close this window. The imported testcases can be found in the "Imported" folder. Imported testcases will be located in a folder bearing the date and time of the import job. This folder can be renamed and testcases can be drag and dropped anywhere in the tree. Hold the Ctrl key during this process to copy them to the desired location.
      2. If the import process is not successful, error messages are shown in the History window that will indicate that the source Excel file may need to be modified. A success folder is created that has all the files that have been successfully imported. Only the files outside of this directory need modifications. Once this is done and the files uploaded back to the Zephyr server, the import job can be re-run. Sometimes multiple such iterations are needed to get a successful importation to happen as Excel testcase files may have been formatted incorrectly.


Best Practice

Due to the varied nature of the source Excel files and potential inherent format inconsistencies, run smaller import jobs (fewer testcases) to ensure greater importing success. When confident of the results, import larger groups of testcases.