Migrate from Azure DevOps

Introduction & contents

This document provides information on the types of test information that users can import from Azure DevOps into TestRail, the process of exporting data from Azure DevOps, and the necessary steps for preparing and importing that data into TestRail. It also outlines what data can and cannot be imported and provides workarounds for situations where data cannot be imported into TestRail.

Features & limitations

TestRail supports importing test cases with all the supported fields, from header fields to template fields, including separated test steps and custom fields, via CSV. The table below enumerates the data supported when importing test cases via CSV, as well as the current limitations.

Supported Limitations
  • Default fields
  • Custom fields
  • Test steps
  • Preconditions
  • Attachments - TestRail CSV import does not support attachments
  • The migration of data-driven test cases in Azure DevOps is not covered in this tutorial. This is due to Azure DevOps lacking support for exporting data-driven parameters to an Excel file.

Import requirements

To import test cases with custom fields from Azure DevOps to TestRail, it is necessary to create matching custom fields in TestRail prior to the import process.

Exporting test cases from Azure DevOps

You can export test cases from Azure DevOps with the help of below steps:

  • Access your Azure DevOps account using your credentials
  • Select the project from which you want to export the tests
  • Navigate to the Test Plans section of your project

    Capture1.JPG

  • To select all test cases and perform a bulk export, you should create a custom suite using a query. You can do so by accessing the New Suite option and selecting Query-based Suite

    Capture6.JPG

  • To select all test cases from a project, filter by Work Item Type and Area Path, as per the image below

    Capture4.JPG

  • Now that the new suite is created, you can export all of its test cases by using the export icon. This will generate a CSV file similar to the sample CSV File 

    Capture5.JPG

 

Please note that you can only access the Azure DevOps export facility if your user access level is Basic + Test Plans.

Importing test cases to TestRail

The common fields to all templates can be mapped to TestRail fields as per the table below. For fields that may not exist by default in TestRail, you can create a new custom field to map your data to.

Azure DevOps Excel columns TestRail fields
Title Title
Step Action Steps(Step)
Assigned To Assigned To
Step Expected Steps (Expected Result)
State Status
Area Path CUSTOM FIELD
Work Item Type CUSTOM FIELD

Importing test case data into TestRail is very straightforward. Just navigate to the project to which you want to import the test cases and follow the steps below.

  • Navigate to the Test Cases page
  • Click the Import Cases icon on the top of the page and select Import from CSV

    C12.JPG

  • On the first step of the import dialog:
    • Select the CSV file you want to import
    • Select the Section you want the file to be imported to
    • Select the File Encoding as Windows-1252(Latin)-Excel default. This is the default file encoding used by Excel
    • Set the CSV delimiter to be a comma (or the delimiter you used when saving the file)
    • Set the Start Row to 1
    • Is header row checkbox should be checked as our Excel sheet includes a header row
    • Set the Template to Test Case (Steps)
    • Click Next

      Capture8.JPG

  • On the second step of the import dialog:
    • Set the Row Layout to Test cases use multiple rows
    • Set the Column to detect new test cases value to Summary. This means new test cases will be detected based on the different summaries available
    • Map the CSV columns to TestRail fields (you can see a simple example in the image below)
    • Check the option Ignore test cases/records without a title
    • Click Next

      Capture9.1.JPG

  • On the third step of the import dialog:
    • Select Remove HTML tags from CSV values for all fields
    • Click Next

      Capture10.JPG

  • On the fourth and last step of the import dialog:
    • Confirm the information processed by TestRail is as expected
    • Click Import

      Capture11.JPG

  • Once the import is done, you will get the confirmation dialog, as shown in the screenshot below.

    Capture12.JPG

Viewing imported data in TestRail

You should now see your imported test cases as per the image below.Capture13.JPG

Capture14.JPG


Was this article helpful?
1 out of 4 found this helpful