Skip to end of metadata
Go to start of metadata

Test Management for Jira (TM4J) allows you to import test cases from Xray, which can save you lots of redundant recreation effort.

An external script converts the file that contains the Xray test cases into a usable format that can be imported into TM4J.

Super simple.

Oh, and we have a way to get your attachments into TM4J, too!

Exporting Xray Test Cases

Complete this part of the process in Xray.

  1. Click TestsSearch for Issues in the navigation bar at the top of the page.

  2. Use the filters and/or search bar to filter the Xray test cases you want to export.
    The Project and Issue Type filters are useful to focus the cases you want to export.

    Test cases you want to import into TM4J should follow a one-file-per-Xray-project rule. If it's too difficult to decide which test cases you want to export, it's usually no big deal to export most or all of the test cases in a project, even if you will not need all of them in TM4J. Once the test cases are in TM4J, you can archive those you don't need.

  3. Click Export, then click XML in the drop-down list.



  4. If the file does not automatically download to your computer, click File > Save Page As, and save the file in XML text format.


Converting the XML File

The exported XML file needs to be converted to a format TM4J knows how to import. You can achieve this using a command-line script.

This part of the process begins in Git.

  1. Clone the Git repository for the file converter.

  2. Click README.md to open the file.



  3. Follow the steps in the README file.
    The Xray XML file converts into a new XML file format, which you can import into TM4J.

Importing the Converted XML File into TM4J

Complete this part of the process in the TM4J project into which you want to import your Xray test cases.

  1. Open your desired project, and ensure you're in the Tests view.

  2. Click New > Import from File.
    The Import from File wizard appears.

  3. Click Test Management for Jira.


    The wizard progresses to the Setup stage.

  4. Upload the converted XML file by dragging and dropping it into the defined area or by clicking Choose the File and selecting it from your local storage.

  5. Complete the field and options in the Settings section.
    1. Destination Folder - The folder into which you want to import your test cases.
    2. Import Linked Issues If checked, issues linked as test-case coverage will be imported.
    3. Import linked Confluence Pages - If checked, test-case links to Confluence pages will be reserved.

  6. Click Next.
    The wizard progresses to the Field Mapping stage.

  7. Map your fields.
    Unmapped fields will not be created.

    If you intend to migrate test case attachments into TM4J, you must map the Original issue key field at this time. (Additional steps are explained later on this page.)


  8. Click Next
    The wizard progresses to the Data Mapping stage.

  9. Map your data type for components, priorities, statuses, labels, etc.
    A message appears if there is no data to map.
    Note the option to automatically create unmapped labels.

  10. Click Import.
    Your test-case information imports to TM4J. The wizard advances to the Results stage, where import messages and errors appear.

If the test cases you imported have attachments you also want to migrate into TM4J, complete the steps in the Importing Test Case Attachments section.

Migrating Test Case Attachments into TM4J (optional)

Complete these steps if the Xray test cases you imported into TM4J contain attachments you also want to migrate. This is accomplished using the Original issue key custom field you mapped in a previous section. The script (below) then reads attachments from Xray test cases (Jira issues) and uploads them to TM4J using the REST API.

  1. Clone the Git repository for the attachment migrator.

  2. Click README.md to open the file.

  3. Follow the steps in the README file.
    The process is logged on the console, and the images upload to TM4J.
  • No labels