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

UI script: In test run view, add column to indicate attachments


We would really like to be able to quickly see which test case results in a test run have attachments on them. I’m new to UI scripts but from the other posts in this forum, it seems like it wouldn’t be too hard. Is there already a script that does what I’m describing?


Hello Rusty,

Thanks for your posting. This wouldn’t be supported with UI scripts currently (as there’s currently no API for attachments) but it’s already planned to make this available as a built-in feature (e.g. by adding a new column for the test/case tables for this). I’ve just added another vote to this feature request, thanks for your feedback on this.



Technically it is possible, but not trivial and not reliable. This will require GET’ting a /cases/view/:id HTML page for each case in the suite and check for “attachment-item” text in page content (there are no DOM elements with such class if there are no attachments). Unfortunately there’s no easier way of doing this so far


Hi Tobias,

We are currently facing a similar issue in our Project. We Need to check which testcases in Status “failed” don’t have a corresponding documentation for debugging purposes attached. Any updates on this Feature-vote?

Another approach fitting my goal would be the possibility to make Attachments required when Setting the Status to “Failed”.

Kind regards,

Request: UI script making it required to attach a file if testcase fails
Request: UI script making it required to attach a file if testcase fails

Hi Max,

Thanks for your feedback! One option to check this quickly is to set a status filter for Failed tests and then go through the filtered list via TestRail’s three-pane view:

You can quickly navigate through your tests with j/k and check if the documentation is attached. We are also happy to look into both feature requests, thanks again!



Hi Tobias,
Sorry for my late reply. The three pane view is indeed a great Feature, but just a different way of manually checking each and every testcase for attachments, which i am back to doing at the Moment.

Since concerning Actines comment it’d be rather tricky to implement the request via UI-Script, i want to quickly explain an idea i just had clicking through Test-Rail.

In “Administration”> “Customizations”> “Edit Field” it is possible to apply a field only to certain “templates”.
Of course “templates” does not fit my request,

But wouldn’t it be possible to implement a similar function for the “Add Result” popup?
Beeing able to add optional fields, that automatically get required as soon the “Status” is set to eg failed?
The dependency that can be established to different “Templates” basically describes what i Need, but for testresults.