When I try to format the xml file exported from testlink to a testRail format using the command
php testlink2testrail.php BarreDeNavigationNouveau.xml BarreDeNavigationNouveauRail.xml
I got a newly generated file without test cases. This message is shown in the console
Successfully converted 10 sections and 0 cases
All configuration files "parsehtml.php -- markdownify.php -- testlink2testrail.php" are OK.
I expected BarreDeNavigationNouveauRail.xml with all test cases, however this is not the case. How can I generate this XML file correctly?
I attempted to reproduce the problem you reported, and I observed the same issue as you described. When I attempted to format the XML file from TestLink using the provided command:
php testlink2testrail.php input-file output-file
It resulted in the conversion of sections, but not the test cases themselves.
I think that this is the limitation of the outdated nature of the script provided in the TestRail documentation. The script seems not to be updated for a long time and hence it seems to be a bug or limitation here.
But there is an alternative solution. You can utilize a Python script which is now available for TestLink migration. You can find the link for it here: https://github.com/gurock/testrail-custom/tree/master/testlink-migration
This Python script can convert XML files exported from TestLink into compatible CSV files, which can then be imported into TestRail.
In case you would like to export the test cases within the project in TestLink to TestRail, you can use the below script :
python3 TestLink2TestRail.py -i inputfile -o outputfile
Here TestLink2TestRail.py is the Python script that is responsible for converting the XML file to CSV file.
The input file is the XML file exported from the TestLink and
The output file is the newly generated CSV file that can be imported into TestRail