Migration: TestLink

This script can be used to convert TestLink XML files to TestRail's XML import file format. To export your test cases in TestLink, select <em>Specification</em> and click on the test suite sub-tree you want to export. From the right side, select Export Test Suite and save the XML file.

The script converts a the tree of a TestLink test specification into a single test suite of TestRail. The tree structure is represented with sections and subsections in TestRail. To import a converted file into TestRail, create an empty test suite and choose the import button from the toolbar.

Unlike TestRail, TestLink uses HTML for formatting test case properties. The script tries to convert these fields into TestRail's text format (markdown) where possible.


You can download the latest versions of the TestLink migration scripts here (please see the comments regarding TestLink versions below):

TestLink 1.9 or later migration
A script to migrate your TestLink test cases to TestRail

TestLink 1.8 or earlier migration
A script to migrate your TestLink test cases to TestRail


Please note that TestLink has a new XML export format starting with TestLink 1.9. That's why we have separate conversion scripts for TestLink 1.8 or earlier versions, and TestLink 1.9 or later. TestLink 1.9 is using separate fields for different test steps and the conversion script is converting the steps to separate steps in TestRail as well. Make sure to configure the test steps in TestRail accordingly if you want to convert test cases from TestLink 1.9 or later to TestRail.


> php testlink2testrail.php <input-file> <output-file>

<input-file> should be the filename of a valid TestLink XML test
specification export file you want to convert (created with a
recent version of TestLink).

<output-file> specifies the filename of the resulting TestRail
import/export file.


The following examples are included in the download archive.


This example comes with a TestLink export file called `testsuites.xml`. The file also contains simple HTML formatting. To convert the sample file to TestRail's XML file format, simply execute the following command from the `examples\simple` directory:

> php ../../testlink2testrail.php testsuites.xml suites.xml