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

Feature Request: Upload attachment to test result in mini API


#61

Hi Suresh,

Thanks for your feedback! I’ve added your vote this request as well.

Regards,
Marco


#62

Please add my vote too for this feature. We really need API to upload files to testresults


#63

+1 vote for the Attachment via API.

This request is in your system for the last 6 years. :slight_smile:


#64

+1 from me.
Pretty please.


#65

+1 . This will be a great feature


#66

Pretty please, this would be a good feature.


#67

+1 for this feature. It will be extremely useful to add log files file the API.

Any update on development of the feature?


#68

+1 for This Feature.


#69

Please add another vote.

This is unfortunately going to be a business requirement for my company going forward. We are required to provide evidence of testing, even for test cases executed by automated tools. This evidence usually takes the form of either a screenshot or a log file.

We’ve been using TestRail for several years now and hate the idea of switching, but this issue hasn’t seen any traction for six and a half years. When our support license comes up for renewal, sticking with TestRail at the cost of not being able to use automation for testing is going to be a tough sell.


#70

Thanks for all your feedback! I added your votes.

Cheers,
Sabina


#71

+1 for This Feature - really need it for error logs


#72

+1

I actually couldn’t believe it’s not already implemented. It’s so obviously needed for any kind of test automation. I was stunned it’s not already there. Currently I’m considering writing a simple php script to add attachments myself. If I can do it, Gurock surely also can, right? Right? Riiiight?


#73

+1 for this feature.

Do you have plan to open the feature request list so that all users can vote them and your support team also can prioritize the features that real benefit your customers. and it also can help you communicate with users closely.


#74

not sure about the mini api but here is a simple way to do it (on windows - you can do the same thing on linux with tomcat and simlinks)

test rail is hosted in IIS. so in IIS just create a new virtual directory under the test rail site and call it something like ‘screenshots’. Point this virtual directory to a network share that your tests save your attachments to.

Then when you’re updating a result comment via the API, just use the (link) sintax and give it the relative path (relative to your site home i.e. ‘www.testrail.com/[relative dir]’) to your attachment via the virtual directory i.e. ‘/screenshots/attachment.png’ and vioala

so, to sum it up
-create a network share that can be accessed by your test rail server and your tests:
’\\share\attachments’

-create a virtual directory in IIS under the test rail site:
’attachments’ -> '\\share\attachments’

-save an attachment during test run (fun.png):
’\\share\attachments\fun.png’

-log link to attachment in a result comment or some step result via the test rail api
self.client.send_post(‘add_result_for_case/[testrunid]/[testcaseid]’), {‘comment’: ‘see attachment here: (/attachments/fun.png)’ }

this works like a charm storing and showing screenshots during selenium test runs! Let me know if anyone has any questions!