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

Ruby code to update automation testcase result to TestRail


I use following code to get the details of a test run

client =‘’)
client.user = 'arpit_kumar_gupta’
client.password = ‘A3PCmlkKF7ckFKVkNzZ’

c = client.send_get(‘get_run/R2002’)
puts c

request = "get_results_for_run/R2002"
c = client.send_get(request)
puts c



Thanks for your post! You would use the add_result_for_case method to add a result to any test in a test run via the case ID. We wouldn’t be able to provide any specific custom script troubleshooting as part of our support, however you can review an example POST request for this on our website here:

Hope this helps!