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

Ids not imported when importing xmls generated from another Testrail


#1

Hi,
I had a testrail installation and i have created plenty of test cases on that instance.
I wanted to move my installation to some other server and so i exported all the test cases/suites.

I installed another instance of TestRail on some other server and imported all the test suites and test cases generated from previous installation.
But after the import when i checked the test cases and test suites, i found that the testcase ids and test suite ids are renumbered from 1. This is really very disastrous for me as i have used test case ids as reference at very places.

What is the resolution/workaround for it ???
Prompt response is highly appreciated.

Thanks,
Prashant


#2

Hello Prashant,

Thanks for your message. Instead of exporting/importing the test cases via XML files, I recommend simply moving the entire database to the new server. This way you won’t have any changes with the test case IDs and all other data is also moved to the new server. To move a TestRail database to a new server, simply follow these steps:

  1. Make a backup of your original TestRail database with the backup tools of your database
  2. Install TestRail on the new server
  3. Restore the backuped database on the new server in a newly created database
  4. Change the config.php file on the new server to point it to the new database

Please use the exact same versions of TestRail for both systems. If you have any further questions about this, you can also email us directly: contact (at) gurock.com

Thanks,
Dennis


#3

Thanks Dennis for the quick response.
The problem is Testrail database is lying with the customer and they are not very willing to share it with us.
Isn’t it possible with the xml exports ?
I am keeping database dump as the last option if no other workaround is available.

Thanks,
Prashant


#4

Hello Prashant,

It’s not possible to specify the IDs that will be used for test cases when you import test cases (or even create them via the API), so the database backup would likely be the best way to do this. If your customer is worried about shareing unrelated projects or test suites, they could create a backup of their TestRail server, create a separate temporary instance with this data and then delete any unrelated projects/suites in this temporary instance before sharing this database with you. This way they can clean up the database before send you a backup.

Thanks,
Dennis