In this article I would like to talk on how to migrate Zephyr data between Jira instances.
Zephyr is a plugin for Jira, which handles test management. The data of this plugin consist of test cases, test steps, executions and test cycles.
There are four types of possible migrations:
1. Cloud to Cloud.
2. Cloud to Server.
3. Server to Cloud.
4. Server to Server.
You can migrate the whole set of Zephyr data only for Jira Server to Server migration.
For all other cases, unfortunately, you can only migrate test cases and test steps. The reason is that plugin data are not stored in the Jira Cloud database, that is why standard backup/restore procedure does not backup or restore plugin data in Cloud.
Test case is an issue of a certain issue type. By default the issue type is called Test.
Since a test case is an issue, all test cases can be migrated by standard backup/restore procedure in Jira for all types of migration.
That is why there are no problems with migration of test cases.
Test step is an entity of a test case. There are can be multiple test steps for a test case. You can see how it looks like in Zephyr in the screenshot below:
Then question is:
How to migrate all test steps after we restored a Jira backup?
There are two choices:
This is a paid add-on, which provides Rest endpoints to Zephyr data. if you can afford to buy this add-on, then you can buy it, but you would still need to write a script or a program to migrate test steps using ZAPI. Actually, you can migrate all Zephyr data using ZAPI, but you would need to write code.
You can read how to use this utility here:
The only thing, which is not obvious in the guide, is, that when you map test step attributes to an excel sheet, you should use column numbers. For example, if you put a test step name in the first column in Excel, you should map this column as A for the Step row.
So this utility can import test steps. It is good to know, but how would we get all test steps for each issue?
It would be good luck to have all test steps for each issue in an excel file, but, unfortunately, that is a rare case, since users add test steps to Jira manually. That is why we need to get test steps from Jira.
You can get information about test steps, if you export all executions to a csv file (Test -> Search Test Executions -> Export). But you will get only test steps, which were ever executed, which means, that probably you will loose test steps, which were never executed.
After you exported executions, you can load this file by the Zephyr for Jira Importer Utility. But there are the following drawbacks:
1. Exported file contains all executions, that is why if a test step was executed multiple times, then this test step will be loaded multiple times, and you will have multiple copies of the same test step for an issue.
2. If the import process stops or fails, then you have to start over. And all test steps, which were imported before the import stopped, will be imported again. Your test steps will be doubled.
3. The Importer can only import data for one project at a time.
Considering these drawback, you would need to write a script to prune your exported csv file so, that you could import test steps. And even if you do so, if the import suddenly stops, you would need to clean all imported test steps. Only after cleaning you can start the import process again to avoid duplicated test steps.
In my opinion all available solutions are not good fitted for Zephyr data migration. A program must be written for successful migration of Zephyr data and that is what I am currently doing.
Hope my article helps somebody.
Alexey Matveev _cPrime_Community Leader
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events