===== Steps to Migrate Zephyr Test Case Steps ===== Migrating test cases is not an easy task, if you follow the steps below, you should be successful. Reference from: [[https://zephyrdocs.atlassian.net/wiki/spaces/ZFJ0400/pages/422576142/Import|Import]] [[https://zephyrdocs.atlassian.net/wiki/spaces/ZFJ0400/pages/422805574/Search+Test+Executions|Search Executions]] Step 1: Create filter on source for the project that you're exporting test cases for, name it as "migration ABC tests" Step 2: Open project and create single test cycle with all the test cases: a) Tests -> Plan Test Cycle b) Create Cycle (+ button) -> give it a name such as "Migrated API Tests" (used in step 3b) c) Click the 3 dots button -> Add Tests d) Select "Via Search Filter" enter the name of the filter you created in Step 1 and click the "Add" button e) Verify that you have the right amount of test cases in your test cycle. Step 3: Export test executions to CSV a) In the project, go to Tests -> Search Test Executions b) Perform a ZQL search as follows: cycleName = "Migrated ABC Tests" (---name comes from Step 2b) c) Click Export (button) -> CSV d) Give short meaningful name (there is a character limit on sheet length, I recommend names no longer than 12 characters) ex. ABCExport.csv Step 4: Since Description does not come through, it has to be copied in manually, follow the steps below: a) go to Issues -> Search for Issues b) load up the filter from Step 1 c) Open the CSV file from Step 3 in Excel d) Create empty column in column E e) Add the field name Description in first row of column E f) For each FIRST row of Issue Key (column C) type description from filter into the spreadsheet g) For any fields that don't have anything, you need to put something, I recommend N-A Step 5: Save the CSV file, then convert to XLS by going to File -> Save As -> Select Excel 97-2003 Workbook (*.xls) Step 6: Load up destination jira server project Step 7: Tests -> Importer (if you don't see Importer, you need to enable ZAPI API in Zephyr Plugin version 4.0 and above) Step 8: Select the following for options: a) Project - Project name where you're importing to (ABC) b) Issue Type - Test c) File Type for Upload - Excel d) Link type & Link - leave blank e) Discriminator - By Test Name Change f) Select file to Import - browse for the file you're importing (xls file) Step 9: Once the file is selected, click the "Retrieve Mapping" button - you should see Excel Fields on the bottom right that you will map to the fields on the left Step 10: Map mandatory fields in order to get the test cases: a) Name - Test Summary b) Step - Step c) Result - Expected Result d) Testdata - Test Data Step 11: Optionally map additional fields as needed. Note for example "Component/s" must exist in project to match. They will not be created. We are mapping the following: a) Priority - Priority b) Component/s - Component/s c) Comments - Comment d) Description - Description (from Step 4) e) Fix Version/s - Version Step 12: Click "Import" button Step 13: Verify if all was successful, if not review the logs Step 14: Load up issue search, and find issues you just imported Issues -> Search for issues -> search using JQL: project = ABC and issuetype = Test Step 15: Verify that all data was migrated properly - pick and choose certain criteria Step 16: Create Cycle (see above for steps) and add the test cases to that cycle