Versions Compared

Key

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

...

Table of Contents
maxLevel3

Before importing

The CSV source file must follow some simple rules.

...

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 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

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.

As a JIRA Administrator

For demonstration purposes, the CSV example file from the previous section is used.

...

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

As a Non-Administrator JIRA user

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

...

Info
titlePermissions

Only users that have the Bulk Change permission will have this option available. The configuration can be found in the Jira Administration / System.

Additionally the user will only be able to import data into projects where he has the Create Issues permission.

Setup Page

Provide the basic settings for the importation process.

...

  • The CSV Delimiter field is the column delimiter used in your CSV source file.
  • The File Encoding field is the encoding used in your CSV source file. 
  • Optionally, you can use the settings from a previous importation.

Project Page

  • 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".

Field Mapping Page

Map the fields from your CSV to Jira and Xray fields

...

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.

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.

Value Mapping Page

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.

...

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

Special fields

Attachments

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

...

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.

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

Test Repository folder

If you want to add the Tests to some folder within the Test Repository, you can specify a column having the Test Repository Path.

...

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.

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.


Date Time fields

Dates and Date Time field formats must comply with the Java SimpleDateFormat. On the project mapping page, the format used on the CSV file should be given in order for the import process to complete without errors or warnings. 

Info
titleExample of valid SimpleDateTime formats
  • dd/MM/yyyy hh:mm
  • dd/MMM/yy h:mm a

Comments

Comments can be added to Test issues using the "DateTime;User;CommentBody"syntax, where DateTime and User are optional.

...

Info
titleExample valid comment entries
  • 01/01/2012 10:10;Admin; This comment works
  • 01/01/2012 10:10; This comment also works
  • "This comment is only the text body"

Priorities

An issue's priority defines its importance in relation to other issues. You can read more here. Before Jira 7.6, priorities could only be defined globally (i.e, for all projects). In Jira 7.6, Jira allowed a Project to have custom Priority Scheme. When using Jira CSV importer, Jira has different behaviors when Priorities are provided or not, depending on the Jira versions.

...

  • 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.

...

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

Importing data in any system is a non-linear process; you may need to run it multiple times until you get the expected result because it is easy to forget to map a field or use a delimiter, etc.

...