Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3


Note
iconfalse
titleSee and try some examples by yourself
typeInfo

Please see a tutorial with working Examples using Test Case Importer, showcasing different scenarios, which you can download and try by yourself.

Before importing

The CSV source file must follow some simple rules.

...

  1. Test Case Identifier – this is the field used to identify which lines belongs to which test case. In the example below, it is the TCID column.
  2. Summary – this field is mandatory since Jira doesn’t allow you to create an issue without a summary. In the example below, it is the Test Summary column.
  3. Step Action – this field is mapped as the Step field of a Manual Test Step. In the example below, it is the Step Action column.

Here is an example of test cases structure:

Image RemovedImage Added


This is how the CSV file looks like once the test cases above are exported (download it from the downloadable examples section):

Image RemovedImage Added



Info
titleCSV column separator

If you choose the “,” (comma) as the CSV column separator, then you must use quotation marks around any field that contains commas.

...

Info
titleXray issue types and respective screens

Please make sure your project has Xray's "Test" issue type and its associated screens are configured properly. This is done automatically if you followed the Quick Setup instructions.

If you added Xray's issue types by hand to your project or if you changed the screens/screen schem scheme configurations, then you may need to perform additional configuration operations.

More info on Custom Fields and Screen Configuration and Configuring Xray with an Existing Project

Downloadable examples

...

Please check multiple examples in the tutorial Examples using Test Case Importer (as well as code in GitHub).

Importing Test Cases

Xray provides the ability to import multiple test cases at once either as a standard user or as a JIRA administrator; there is no limit on the number of tests that can be imported.

...

  1. Log in with an administrator account.
  2. Go to System > Import and Export > External System Import.
  3. Select the Xray Test Case Importer. Image RemovedImage Added
  4. Follow the Setup Page section instructions

...

  1. Log in with a non-administrator account.
  2. Got to Tests menu > Test Case Importer as shown in the image Image RemovedImage Added
  3. Select the Test Case Importer menu item
  4. Follow the Setup Page section instructions

...

Provide the basic settings for the importation process.

Image RemovedImage Added

  • The CSV Delimiter field is the column delimiter used in your CSV source file.
  • The File Encoding field is the file encoding used in your the CSV source file; this is especially important when the file contains non-ASCII characters. The supported encodings can be seen here.
  • Optionally, you can use the settings from a previous importation.

...

  • Select the Xray project where you want your Manual Test cases to be imported. 
  • Set the Date formats that will be used for all Jira custom fields and also to the Manual Test Step Custom fields of type "Date picker" and "DateTime picker".
  • Check the Hierarchical Test Organization - Create Folders option to allow mapping the imported Manual Test cases Test Repository Path on the Field Mapping Page

Image AddedImage Removed

Field Mapping Page

Map the fields from your CSV to Jira and Xray fields

Image RemovedImage Added


It is mandatory to map at least three fields:

  1. Test Case Identifier (located under Manual Test Step fields). In this example, this field is mapped to the TCID column from the CSV file.
  2. Summary (Located under Jira fields) In this example, this field is mapped to the Test Summary column from the CSV file.
  3. Step Action (located under Manual Test Step fields) In this example this field is mapped to the Step Action column from the CSV file.

...

Info
titleCustom field mapping

Only custom fields that have the issue type Test selected as one of the applicable issue types will be available for mapping.

Image Modified

Available custom fields for import:

  • Checkboxes
  • Labels
  • Number fields
  • Radio buttons
  • Select lists (single choice and cascading)
  • Text field
  • URL field
  • User picker

Note: Only "single-value" custom fields are supported. "Select List (cascading)" custom fields behave as a single-value field; in that case, you have to specify the value in the format "parent -> child" as mentioned also for Jira's native CSV importer.

...

Map the CSV column values. In the example above, the Map Field Value checkbox is selected for Priority, so those values are going to be mapped.

Image RemovedImage Added

Now just click Begin Import and Xray Test Case Importer will import the manual test cases to the selected project.

Image RemovedImage Added

The importation process is complete. A configuration file can be saved to import other manual test cases in the future.

...

It is possible to attach files to Test and to Test Steps.

Image RemovedImage Added


Info
titleAttachments

The attachment may be referred by name (in this case the file:// protocol is assumed), by "file://" or "http(s)://". Multiple files may be specified within one CSV column; for this, the attachments must be delimited by space.Image RemovedImage Added

Note: For file protocol, only files in the "<JIRA_DATA_HOME>/import/attachments" folder will be imported.

...

Folders and their respective sub-folders must be delimited by "/", as shown in the following example:

Image Removed

Image Added


To create new folders and sub-folders, in case they do not exist in the Test Repository, or map the imported Manual tests to folders and sub-folders that already exist in the Test Repository, you must select the option 'Create Folders' in the Setup page of the Test Case importer.

Info
titlePlease note

To have this option available, you must be able to, at least, access the target project (i.e., browse permission), the Hierarchical Test Organization must be enabled in Xray settings, and:

Or

Image Added


With the 'Create Folders' in the Setup page of the Test Case importer, on Field Mapping page, during During the mapping step, you need to map the CSV column containing the path to the "Test Repository Path" Xray's custom field.

Image RemovedImage Added


Info
titlePlease note

The "Test Repository Path" is case insensitive and each folder is trimmed (spaces are removed from the start/end of it).

This means that "components/compA", "components /compA", and " components/COMPA" are all the same and will be mapped to the same folder within the Test Repository.

If the folder is not found, then the Test is created, but it is not associated with any folder; it will appear in the "Orphans" meta-folder. Unless you selected the option 'Create Folders', in the Setup page.

To create new folders and sub-folders, in case they do not exist in the Test Repository, you must select the option 'Create Folders' in the Setup page of the Test Case importer.

Make sure you have the Hierarchical Test Organization enabled and the logged in user belongs to a Project Role allowed to edit the Test Repository. You can check this settings under the Xray Global Settings.

Image Removed

You can import a link to other issues for newly-created Tests by choosing the "Link ..." mapping.

...

Info
titleLinks to requirements

When importing Tests, you can specify the links to the requirements that each Test validates. For that purpose, columns must be mapped as Link "Tests".

If the Test covers multiple requirements, then multiple CSV columns must be used, each one being mapped in the same way.


Image Modified

Date Time fields

...

  • Priority is provided and is associated with Project: Xray will create the Tests with the priority provided in CSV
  • Priority is provided but does not exist or is not associated with Project Scheme: Xray will create Tests with the default priority if set, or with the lowest ranked priority;
  • Priority is not provided: Xray will create Tests with the default priority if set, or with the lowest ranked priority;

Issue Key (Update Existing Manual Test)

As in Jira's native CSV import, we provide means to updating an existing issue.

Image Added

In order to Update an issue you must comply with the following pre-conditions:

  • Issue keys must belong to the same project as mapped in the "Import to Project" option.
  • Issue keys must belong to an existing editable Issue, of type "Test" and with a "Manual" Test Type.
  • User must have Create and Edit permission for all Issues being updated.

While updating the Manual Test Issues, keep in mind that your Manual Test Steps will be overwritten with the new Step specification declared in the CSV file.


Info
titleUpdate Issue Field Behaviour
  • Manual Test Steps will be overwritten with the new Step specification as declared in the CSV file (including any Test Step custom fields)
  • All other issue Native and Custom Fields for the issue, will be updated according to the same rules applied in the Jira's native CSV importer.


Useful tips for importing Tests

...

  • Add a unique label to all your tests, so you can clearly identify the tests imported at a given time. This will make analysis simpler and performing bulk operations (e.g., change fields, remove fields) will also be easier.
  • Use a custom field for storing the external ID of the tests in their original system. Thus, whenever tests are imported, you can easily compare them with the original tests in the original system;.

Examples

Please see a tutorial with working Examples using Test Case Importer, showcasing different scenarios, which you can download and try by yourself.