Versions Compared

Key

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

You can use the Xray's Test Case Importer to import Tests tests and test sets from a CSV or JSON source file. 

...

  • preparing data (CSV/JSON) beforehand
  • submit the data 
  • choose the destination project along with some global settings
  • for CSV, define the mapping of CSV columns <=> fields in Jira 

...


Info
titlePlease noteSupported issue types

The Test Case Importer is only able to create Test test and test set issues. If you wish to create other types of issues, you should use Jira's CSV importer instead. Note that Jira's CSV importer is not able to handle any Xray related semantics though.


Table of Contents
maxLevel3

Accessing the Test Case Importer

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


Info
titlePermissions

Only users that have the Make Bulk Changes 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.

...

You can name the fields as you wish since they are going to be mapped during the importation process, but there are three mandatory fields:

  1. Test ID – a unique identifier for the issue, this field is the field used to identify which group lines belongs that belong to which the same test case or to identify a test set.
  2. Summary – this field is mandatory since Jira doesn’t allow you to create an issue without a summary.
  3. Test Type – this field defines the Test test type of the each test to import. The Test Type test type must match one of the types of the project to which the test is being imported.

Here is an example of a source file as seen in a spreadsheet application:

Image RemovedImage Added

Here is the same example as seen in a text editor:

Image RemovedImage Added

Info
titleImporting into multiple projects

The tests issues can all be imported to the same project or into multiple projects, one column in the source file can be used to define the destination project (either by having its key or id).

...

  • An existing configuration file saved from the last import made with this file or a similar one.
  • The file encoding used in the CSV source file, this is especially important when the file contains non-ASCII characters. The supported encodings can be seen here.
  • The CSV delimiter is the column delimiter used used.

Setup step

Aditional Additional setup information, for choosing the destination project along some settings related with the source data.

...

Besides these ones, if you have defined additional fields as mandatory for Test issues, then you will also need to specify their mapping.

Image RemovedImage Added

Project field

The project to which the test will be imported can be defined for each test in a field. The fields "Project Key" or "Project Id" can be used for this.

If no project field is mapped or when the value in this field is empty, the project selected in the Setup step will be the one where these tests will be imported into.

Issue Type field

The type of the issue being imported. The supported issue types are:

  • Test ("test" case insensitive)
  • Test set ("testset", "test_set" or "test set" case insensitive)

If no issue type is defined for an issue being imported, it will default to test.

Image Added

Test Sets field

Only for test issues, a list of test sets to which a test will be added.

Each value should be the issue key of an existing test set or the id of a test set also being imported ("Test ID" field).

Image Added

Test Repository Folder field

The Test Repository folder path to the folder in which the Tests will be associated.

...

Example of one test in the JSON import format:

Image RemovedImage Added

Open Test Case Importer

Open Test Case Importer and choose the JSON file formatrformat.

File Import step

Choose the file having the source data to import from.

...

Example of 5 tests imported successfully:

Image RemovedImage Added

You may also download the detailed import results, this is useful to get the issue keys of the imported test issues and also to see which tests issues were not imported and why.

Example of 4 tests 2 issues imported out of 5:

Image RemovedImage Added

Detailed import result for the example aboveExample of detailed import results:

In the detailed import resultresults, the elementNumber field represents to which test issue the information corresponds to (elementNumber 0 being the first testissue).

When importing tests into Test Repository folders, if for any reason the process is unable to create a folder or move a test to the respective folder, the respective tests will be still be migrated and a warning detailing the situation will be written to the import result.

...

When importing a file, when the import status is being shown, you can download the configuration file that will have all the settings you've set:

Image RemovedImage Added

And then you can use it when you import the next file (if the configurations are supposed to be the same or similar):

...