Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

TestLink XML migration to Test Rail


#1

In order to move to Test Rail, we need to migrate our Test Cases from TestLink 1.9 to TestRail, however the requirement (doc_id) and execution type are lost with the available php migration script. This means traceability is lost.

The doc_id will need to map to References and Execution Type to the Type.

Has anyone found a solution to this?

Thanks.


#2

Hi Chris,

Thanks for your posting. One option is to modify our conversion script and TestRail’s XML import fully supports the References and Type fields. The conversion script is a simply PHP script and adding additional fields would just mean adding more fields to the generated XML file. You can find the conversion script here:

http://docs.gurock.com/testrail-admin/migration-testlink

Cheers,
Tobias


#3

Tobias,

I have updated the supplied migration script to meet our needs, e.g. here is some code added to the write_case function to migrate the requirement IDs.

    if (isset($case->requirements->requirement))
    {
            foreach ($case->requirements->requirement as $requirement)
            {
                    if (isset($requirement->doc_id) &&
                            (string) $requirement->doc_id)
                    {
			if (isset($content))
			{
				# Append
				$content .= ', '.html_to_markdown(
					(string) trim($requirement->doc_id));
			}
			else
			{
                            	$content = html_to_markdown(
					(string) trim($requirement->doc_id));
			}
                    }
            }
	xml_write_tag($handle, 'references', $content);
    }

Thanks, Chris


#4

Thanks for sharing this, Chris!

Cheers,
Tobias