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

Test Rail - get_results_for_run



I am on TestRail v2.7.0.1978. I am trying to get results of a particular run using “get_results_for_run”.
I am seeing the below error:
SyntaxError: invalid syntax

I am trying to integrate the the API using Python bindings. Can someone help me with this?


Hello Lavanya,

Thanks for your posting! TestRail’s v2 API is only available for TestRail 3.x and later, so we would recommend updating to a newer TestRail version (ideally the latest 5.x versions). The syntax error you see would be independent of TestRail and I believe this is Python syntax error, is this correct? The code for accessing TestRail’s API via Python and our binding looks as follows (but again, this requires a more recent TR version):

The GET ... expression forms the basis for the raw HTTP call and is only used for the API documentation.



Thanks for your reply Tobias :slightly_smiling:
Is there any API which is supported in v2.7.0.1978 TestRail to get results by RunID?


Hello Lavanya,

This particular API method is only available with the v2 API and was introduced with TR 4.0 so we would recommend updating your TestRail installation if at all possible. The v2 API is much easier to use, has official API bindings for various programming languages and more powerful than the previous API and gets new features all the time, so it’s definitely a good idea to use the current API going forward.