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

[API] Upload screenshot


#1

I want to upload a screenshot taken by my automation when a test fails, but there doesn’t seem to be a way to do this in the add_result API (I’m using v2). Is it a different API to add a file to a test result?

Thanks,
Myles Stewart


[UI Script][Plugin][PoC] TestRail plugins — working demo
#2

Hello Myles,

Thanks for your posting. The API currently doesn’t support attachments/file uploads unfortunately. We recommend uploading the screenshot to an external location and then adding a simple image link to the test result. Text boxes in TestRail support a rich-text format called Markdown and you can add images to the test result comment as follows:

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

I hope this helps and please let me know in case you have any further questions!

Regards,
Tobias


#3

I would like like to suggest some related changes to the API. I would like to generate new test cases on demand from and new button on our defect tracker system. The API allow basic creation of the test case, but not to add any screenshot images that may be filed against the bug. Can you expose this capability through the API in the next release.


#4

Hello Gerry,

Thanks for your posting. We currently recommend uploading files and screenshots to an external location and referencing them as part of the test case. It’s also planned to add support for attachments to the API and I’ve just added another vote to this feature request, thanks!

Regards,
Tobias


#5

@tgurock

Any update on this issue? Is there anywhere we can track these feature requests? Adding attachments via api would be super helpful.


#6

For the record, please add my vote for that too. Looks like that’s the only thing missing from the API before all test case management functions are covered


#7

Hi all!

There’s currently no direct update on this but we still have this on our todo list. I’ve added your votes, thanks for your feedback! You can always use the workaround of uploading the files/screenshots/attachments to an external location and then referencing the files via links in your result description.

Regards,
Tobias


#8

Hi @tgurock,

We are already using the method you described here.
But, at the same time we are waiting for an update to this request.
It would be nice to get an update about this again.
Also, please add my vote to the feature request. :wink:

Thank you.

Regards,
Sanat.


#9

Added to the list, Sanat, thanks for your feedback! :slight_smile:

Cheers,
Tobias


#10

This would be huge to my team. +1 vote


#11

Added another vote, thanks for the feedback :smile:

Cheers,
Tobias


#12

+1, I’d like to see this too.


#13

another +1 from our side here. This would make our pipeline way simpler


#14

Added, thanks :smile:

Cheers,
Tobias


#15

+1 for our team as well.


#16

Added to the list, thanks :smile:

Cheers,
Tobias


#17

Any update on this feature request please, I would like to up vote this too.


#18

Hello Ankit,

Thanks for your feedback! We currently don’t have an estimate for this feature but I’m happy to add another vote. We can recommend the workaround of uploading the file to an external location and simply including a link/embed the screenshot as part of your result description.

Cheers,
Tobias


#19

Hi,

We would really like to have this feature as well, please add another vote


#20

Thanks for your feedback, Sander :slight_smile:

Cheers,
Tobias