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

UI scripts in the cloud



I like to try out some automations from TestRail (similar to The problem is that I don’t have any idea how this is possible in the cloud?

Do I see it correctly, when using the TestRail cloud instance, the trigger.php script must be on a publicly available web server on our side ? The script must reside in our domain, otherwise local services that start the automated testing are not known.

I have unfortunately minor php knowledge, how is it then with authentification ? How create an UI script that triggers only for authenticated usage ?

Background: I like to be able to select a set of automated tests and then press a button, then a script is called with the run_id and the ids of the selected test cases (or all test cases if non is selected). The script triggers Ranorex (in our case) to execute the corresponding tests and send results back to TestRail

It might be simple to use the UI script to generate the command and show this in a message dialog, copying the command on the local server and execute then Ranorex with it. I don’t see a complete automated way of doing this with the cloud solution, or is one there ?



You would also be able to use the trigger example/approach with a TestRail Cloud account. You would simply place the server-side trigger script on the server where you would like to execute/run the tests on (usually on your private network). TestRail would not need to be able to connect to your server, as the connection/glue is made via the UI script in TestRail and via your web browser. You can also write the server-side script in any other programming language and our script is only an example.

That said, most customers trigger their automated tests outside of TestRail either manually, scheduled or via a continuous integration system. They then use TestRail’s API to submit the test results to TestRail. We would not usually recommend using the trigger approach, as it doesn’t really provide many benefits.


i thought about the scenario where we have lets say 500 automated test cases. Now for a test run only a subset of 100 are of relevance. In stead of triggering these 100 (and first identify them) in e.g. CI and then report to TestRail, the idea was to let TestRail send to the automation script the test cases of interest.

So that we don’t run the complete automation suite, but only the ones of interest


Thanks for the additional details! Yes, this is a common scenario and we would usually recommend implementing this outside of TestRail as well. A typical approach would be to get the list of relevant cases and pass this list to add_run or add_plan via the case_ids attributes. The list of cases can be generated by looking at the response of get_cases, possibly with a request-level filter or by filtering the case list yourself.

I hope this helps!