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

Feature Request: Add REST API to persist any plaintext data


#1

UI scripts is a very powerful feature of TestRail allowing to extend it with new functionality, write plugins etc. However, currently there’s no way a UI script can store any extra data, which is not related to the tests, on the server (e.g. some UI script settings that shouldn’t be hardcoded).
This would allow for creating complex UI scripts that may need to persist their state, some custom NoSQL database etc (for instance, I am interested in writing a TestRail plugin for steps auto-completion somewhere in the future, and that would require my UI script to persist an array of step strings). And allowing for storing/retrieving plaintext (e.g. separate files for each script, identified by filename) would be the simplest solution from your side.

Thanks!

With best regards,
Actine


#2

Hello Actine,

Thanks for the feedback on this! We have brainstormed various additional ideas internally to provide additional extension mechanisms to TestRail in the future and one of the ideas we had was to build a plugin framework on top of the UI scripts idea we have in TestRail, and extend this with more stable interfaces and also support additional use cases and features such as data storage (and maybe even server-side scripts).

These ideas are thoughts for the long term evaluation of the extensibility interface, so it’s not something we plan to do soon. But this could prove to be very useful to extend TestRail and share customizations/plugins. We are also happy to look into making additional API methods to e.g. store settings available in the meantime and I’ve added it as internal feedback. As a workaround you could either store the data as part of a specific/special project artifact (e.g. in a specific suite) or separately from TestRail for now.

Thanks,
Dennis


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

Thanks for response!

Well, you are right. I guess I can have my plugin store data on my third party server with cross origin requests enabled. Technically it’s even possible to load an external script by appending to the HTML like requirejs does. This may be concerning for the customers though (seen as not secure enough). But indeed it’s possible.

BTW you do verify community-created UI scripts for being exploit-free, don’t you?


#4

Hello Actine,

Thanks for the feedback. Customers can post and share UI scripts on the forum, but similar to other code sharing sites like GitHub etc., we cannot verify every contribution in advance. But most UI scripts are fairly simple so it’s easy to understand what they do. We also recommend using UI scripts just as a starting point and examples for your own scripts/modifications.

I hope this helps!

Thanks,
Dennis