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

Get test IDs from recently created run

Hello there,

When I run my automated tests, I create a new Run using the API. I want to add results to the tests in that run. To do that, I need the test_id of those tests. How can I get them?

this method seems to be most suited for your case: API: Results - TestRail
(add_result_for_case and add_results_for_cases)

You need to provide the ID of the new run and the IDs of the case.

Thanks for the reply.

How do I get the ID of this new run though?

I have not used it but the method add_run returns a response with all the parameters: API: Runs - TestRail

1 Like

I didn’t realize that the sendPost method actually returned a JSONObject with the information. The information that I needed is there, thank you very much.

1 Like