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

Can attachments be re-linked to test suites?


A test suite was accidently deleted. I restored the database to the test server, and through XML export/import managed to re-establish the test suite. However, the attachments are no longer linked to test suite. Is there an easy way of re-linking attachments to a test suite? The attachments still exist in the TestRail/attachments directory, but the records no longer exist in the attachments table within the TestRail database.


Hi Phil,

Thank you for the post. When you ran the database restore did this restore have those test cases with the attachments? If so, they should have been linked already. If you are exporting test case/test run data to XML and then importing it into another TestRail server, the attachments will not be included in that export/import. You would in this case need to manually reattach the attachments to these test cases.


The test suite was restored on a different server. After importing the test suite XML onto the production server, I had to manually identify and re-link all of the attachments.


Hi Phil,

Thanks for your reply and update. Yes, these would need to be manually re-attached as their project association in the database would no longer be valid (this is just a permission/security feature for accessing attachments). Glad you were able to get this working though by updating this manually. Just let us know in case you have any further questions and we’re happy to help!