Since v3.3, Xray has provided a built-in importer for Zephyr Squad for Jira.

Xray built-in importer is only available for Zephyr Squad. Zephyr Scale (previously known as TM4J) is not supported by this migration utility.

All references to Zephyr in this documentation only apply to Zephyr Squad.

As of Xray v3.3, the importer only performs inline migration of data (i.e. Zephyr's Test issues are "moved" to Xray's Test issues).


Before using the Zephyr Import tool

Please check, beforehand, the below versions' compatibility between the Import tool and Zephyr, the necessary requirements, and also the existing features and limitations.

Versions compatibility

Xray VersionSupported Zephyr Squad Version
v3.3.0 - v3.6.Xv4.X.X
From v4.0.0v4.0.0 - v5.5.X
From v4.2.0v4.0.0 - v5.6.X
From v5.1.0v4.0.0 - v6.2.X
From v6.5.0v4.0.0 - v9.2.0
From v7.9.0v4.0.0 - v9.6.2

Requirements before proceeding

  • Zephyr and Xray should be installed.
  • Project, where migration is being done, must have Xray issue types (at least the Tests, Test Executions, and Test Plans):
    • You may use the "Add Xray Issue Types" action shortcut available on the project settings page.
  • Requirement Issue types used in Zephyr must be configured in Xray:
  • Defect Issue Types used in Zephyr must be configured in Xray:
  • Create similar Test Statuses and Test Step Statuses in Xray; this is not mandatory but may ease the process, which will always ask you to make the mapping between Zephyr statuses and Xray counterparts.
  • Make sure Zephyr is using different Issue links between Test<=>Defect and Test<=>Requirement, by going into Zephyr's configuration settings.
  • Do not change, create, or delete any issue in the Project while the importation is running.
  • The only mandatory fields in Xray's Test, Test Execution, and Test Plan should be the Issue Summary and Issue Reporter.
  • Make sure that the Jira workflow states that are being used by "Zephyr Test" Issue type, are editable. Click here for the official Jira documentation on this subject.
  • We strongly recommend you make a backup of your Jira instance before migrating the data.


Please note

The current process performs an inline migration, i.e. Tests and data are migrated to Xray and the original entities are "lost".

Thus, we recommend to backup your Jira instance before performing the migration.

Also, as the amount of data to migrate may be considerably large, we advise you to perform this during non-working hours. Please also make sure that users are not changing data on the project while the migration is being done.


Features and Limitations

Below, please find a list of the support features and current limitations.

Most information will be migrated seamlessly but please check the following table in more detail.


Supported FeaturesUnsupported

Inline migration (not cloning) of:

  • Test and Test steps
  • Test and Test step attachments
  • Links between Tests and Defects/Requirements
  • Cycle
    • including Cycle folders*
  • Executions
    • defects (global and step level)
    • attachments (global and step level)
    • result (global and step level)
    • comments (global and step level)
    • assignee
  • Custom fields in the Test steps and on the Execution
  • All Zephyr executions from the Ad-hoc cycle; only the last Execution is migrated
  • Activity information
  • Test Statuses and Test Step Statuses configurations
  • Cycle folders as such*
(*) Cycle folders will be migrated to Test Executions since the semantics on Xray are a bit different in terms of entities/organization.


How it works

Within this section, you're able to find the exact mapping of entities from Zephyr to Xray.

Mapping of information

Zephyr entityXray entityNotes

Test

  • steps
  • attachments

Test

  • steps
  • attachments
  • if empty, the "Step" column will be filled with "<undefined>"
Cycle

Test Plan (optional)

  • Summary: <version> - <cycle's name>
  • fixVersion: version assigned to Cycle

Test Execution, linked to the previous Test Plan

  • Summary: <version> - <cycle's name> Execution
  • fixVersion: version assigned to Cycle

The Test Execution created here will contain the Executions assigned directly to the Cycle, since in Zephyr you can have Executions at that level besides on each folder.

Please note that...

  • if the Cycle contains multiple Executions for the same Test, only the last Execution will be migrated
Cycle's folder

Test Execution, linked to the Test Plan created earlier from the Cycle

  • Summary: <version> - <cycle's name> - <folder name> Execution
  • fixVersion: version assigned to Cycle

Ad-hoc Cycle

Test Plan (optional)

  • Summary: <version> - Ah Hoc
  • fixVersion: version assigned to Cycle

Test Execution, linked to the previous Test Plan

  • Summary: <version> - Ad Hoc Execution
  • fixVersion: version assigned to Cycle

Execution

  • global comment
  • global defects
  • global status
  • step results
  • step comments
  • step defects
  • step status

Test Run

  • global comment
  • global defects
  • global status
  • step results
  • step comments
  • step defects
  • step status

Please note

All issues will be created in the project where the migration is being performed.


Migrate the Zephyr Test Set and Execution Custom Fields

When importing a project, Xray performs a detailed check of the possibility of migrating custom fields. This verification follows the criteria and steps described below:

  1. Recreation and Reuse of Fields
    • Xray will recreate the migrated custom fields, keeping the same name, type, and options where applicable.
    • If the custom field to be migrated already exists in Xray with the same name and type, it will be reused, avoiding duplications.
  2. Recreating Fields with the Same Name and Different Types
    • If a custom field with the same name already exists in Xray but with a different type, Xray creates a new custom field by prefixing it with Zphr_Xray_<field_name>
    • This process is recursive. For example, when migrating the cf_1 field (a toggle in Xray), and if a single-line text type cf_1 already exists in Xray, Xray will attempt to create Zphr_Xray_cf_1. If Zphr_Xray_cf_1 already exists as a number type field, the system will continue applying the prefix (Zphr_Xray_Zphr_Xray_cf_1) until it can create a field with the desired name and type.
  3. Field Type Conversion
    • During migration, Zephyr Checkbox type fields will be converted to Multiselect. All other field types are matched directly, retaining their original type.
  4. Treatment of Options in Existing Fields
    • When a Zephyr field has options and this field already exists in Xray, the system will add the missing options to the existing options list in Xray, without overwriting the current options.
  5. Warning in Case of Excessive Fields (Only applied to Test Set Custom fields)
    • If the sum of existing custom fields in Xray and new Zephyr fields exceeds the maximum allowed limit (6), Xray will cancel the migration process and notify the user of the exceeded limit.


How to use

Performing the migration is easy; however, it is currently limited to Jira administrators.

The migration follows a wizard-like interface; after going through the steps, some additional tasks are required to ensure consistency of data.

Performing the migration

Suppose you have a project that you wish to migrate from Zephyr for Jira to Xray and that the requirements mentioned above are met.


To start the importation process:

  1. Log in with an administrator account;
  2. Go to System > Import and Export > External System Import;
  3. Select Xray's Zephyr for Jira Importer.

 



If you see the following error message, then it's because Zephyr is using the same issue link types between Test<=>Defect and Requirement<=>Test.

Xray needs to have different relations so that it can understand the different cases. Thus, you need to change the "Linktype for Test → Relation" to something different from the value "LinkType for Requirement → Test". For example, you can leave "LinkType for Requirement → Test" with "Relates" and change the "Linktype for Test → Relation" to "Defect".

These relations are configurable in Add-ons > Zephyr for Jira > General Configuration > Issue and Remote Links Configuration.



After ensuring that the link types are configured with distinct values, you may proceed once again with the migration process. 

The importer will show you some brief information, that we advise you to read carefully.



Then, you need to choose the project where to perform the migration; this will be the same where the Xray entities will be created. 

You may fine-tune the process by (un)checking some flags:

  • Links between requirements and tests to respective Xray Issue Link Type used for requirement coverage: creates the link Xray uses for tracking coverage between Tests and requirements; by default, Xray used the "Tests" Issue link Type.
  • Zephyr Cycles to Xray Test Plans: creates Test Plans based on Zephyr Cycles.
  • Zephyr Ad Hoc Cycles to Xray Test Plans: creates Test Plans based on Zephyr Ad Hoc Cycles.


If Zephyr Cycles to Xray Test Plans and Zephyr Ad Hoc Cycles to Xray Test Plans are unchecked then no Test Plans will be created; nevertheless, Test Executions will always be created if Zephyr Executions exist. 



You need to map Zephyr's Test Statuses to Xray counterparts.



Likewise, you also need to map Zephyr's Test Step Statuses.



A final confirmation dialog presents information about the total number of Xray entities that will be created.



At the end, a brief summary is shown mentioning the total number of Xray issues created and any warnings that occurred during the process.



Please have a look at the following section for some additional steps before concluding the migration process.

After doing the migration

After migrating data from Zephyr to Xray you will need to perform some additional operations to recalculate the status of Tests and the coverage of the related requirements.

  1. Reset the "TestRunStatus" custom field of the migrated Tests
    1. You can use the link provided in the final screen mentioned earlier to quickly obtain the created Tests; you will be redirected to the Issues search page.
    2. Save this search as a filter (you will need it afterwards).
    3. Do a bulk change operation on the Test Issues.


    4. Reset the TestRunStatus custom field.
  2. Reset the "Requirement Status" custom field of the requirements linked to the migrated Tests:
    1. Use the testRequirements JQL function using the name of the previously saved filter as an argument.
    2. Do a bulk change operation on the requirement Issues.
    3. Reset the Requirement Status custom field.



  • No labels