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

Deleted the TestSuite in TestRail


#1

Hi Team,

One of my colleague accidentally deleted the Testsuite from the testrail. Now I want to recover the data back in Testrail. Could you please help me to do this?

I contacted my DB support guys to recover the DB. They informed that they can recover whole DB until last week which contains all the different Testrail Projects. Other projects also loose the current week data if we perform this operation so this is not acceptable.

Please provide me the best solution to recover the data without impaction any thing. We have around 2000 test cases in that deleted Test suite.

Much appreciated your quick response

Thanks,
Hema


#2

Hi Team,

Could you please help me to provide solution?

Thanks,
Hema


#3

Hi Hema,

Thanks for your posting. A database restore would revert the entire database and affects all projects, that’s correct. Another solution would be to restore a database backup to a second database, set up a staging installation and then export the test suites & cases using TestRail’s XML export (and then import the cases again).

You can set up a stating/temporary installation as follows:

http://docs.gurock.com/testrail-admin/admin-staging

If you have a recent closed test run in the production instance, you can also export this test run and we can convert this into a valid export for the test suites/cases again. If this would be an option, you can send the XML export of the closed run to our help desk at contact@gurock.com.

I hope this helps!

Cheers,
Tobias


#4

Thank you so much Tobias. We have setup the backup on another instance and pointed to the restored back up , exported the xml from the restored one and trying to import that xml to the production server. I am getting the maximum upload size exceeded.

Could you please help me to resolve the issue?

Thanks,
Hema


#5

Hi Tobias,

I am able to break down the xml and upload successfully but the issue is new test case ids are getting generated instead of using the old test case ids that are present in the xml.

Could you please provide me the solution for retaining the old test case ids.

Thanks,
Hema


#6

Hi Hema,

Thanks for your reply. The maximum upload size exceeded message is usually triggered by a PHP configuration option and this can be changed as follows:

http://docs.gurock.com/testrail-faq/system-upload-size

Regarding the IDs: it’s not possible to reuse the old IDs and the cases you imported are new cases with their own IDs. While displayed quite prominently, the IDs are more of an internal attribute for cases and it’s not a problem if the IDs change. The same happens if you copy test cases over to a different project or test suite.

Cheers,
Tobias


#7

I will be not able to get the unclosed Testruns for these cases if I cant retrieve the old ids. Am I correct?


#8

Hi Hema,

Not-closed test runs & results are fully deleted from the database the moment you delete a test suite, so there’s no way to restore those without a database restore and this is independent of the case IDs. The only thing that would help in this case is a full database restore but this undo all changes made after the backup.

Cheers,
Tobias