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

Import Attachments from AppTest


#1

Hello,
I need to import the attachments from AppTest to TestRail.

Is there a recommendation on how to do that? I was thinking of just copying them all into my attachment directory and then try to add an entry for them in the attachment database.

Is there a better way of doing this task?

Thank-you,
Cynthia


#2

Hello Cynthia,

Thanks for the feedback. Please never change anything directly in TestRail’s database as even very small changes would directly result in an inconsistent database and unsupported TestRail installation. If you already made changes to the database, please revert any changes by rolling back to a previous database backup.

TestRail’s API currently doesn’t support uploading attachments, but this is already on our to-do list and we plan to look into supporting this soon. That said, you can still already use files with test results/test cases you create via the API via a workaround in the meantime. You can simply upload the files to a separate web server or shared space your team might already be using (or even the same web server as TestRail if you host TestRail yourself) and then simply link to the files from your test results or test cases you add via the API.

TestRail also supports Markdown formatting so you can even format the links to your files so this would work similar to directly uploading files via the API. We do plan to look into support file attachments via the API directly as well though.


#3

Sounds like a good plan to me. Do you know what the api command would looks like for the file linking?
In particular what is the field name is for attachments?

Thank-you,
Cynthia


#4

Hello Cynthia,

You can link to other files/externally uploaded files in TestRail’s text fields simply by including the link. You can also directly embed images as follows:

http://docs.gurock.com/testrail-userguide/userguide-editor#images

I hope this helps!

Regards,
Tobias


#5

Hi,
I am more interested in attaching documents as dgurock suggests.
Would you be about to provide more information on how to update the attachment field through an api call?
Thanks,
Cynthia


#6

Adding attachments via the API is currently not possible but you can simply upload files to an external location and then include a link or embed images in TestRail’s text fields:

http://docs.gurock.com/testrail-userguide/userguide-editor

Attachment support for the API is also planned and I’ve just added another vote to this feature request, thanks!

Regards,
Tobias