The Id shows as “R7” but referencing “R7 or 7” in my API requests doesn’t work so where do I find the real Ids?
If R7 is seen in the UI then the RunId is 7. What error do you get when you use 7 and for what endpoint?
Ah. A couple of things.
- I was putting in the test plan # and not one of the child testrun ids.
- When I did try the testrun id, I was expecting to get back a list of testresult ids regardless of status but your API only returns “” because all the results are untested (presumably).
Maybe give us more detail on what API did you try to hit with what payloads? And what was the response it give you?
I solved the issue but in regards to my second bullet point, I was calling get_tests and passing in a valid testRunId. I was expecting to get back a list of tests regardless of result since I didn’t specify a filter but the API does not return untested tests. Almost as-if “untested” is a special value even though it should be treated like any other.
If you did not put status_id filter, it will shows all tests in the test run. Untested is just another status. If you did not change its id should be 3 by default. Maybe check your script again?
I’m happy to help! With the TestRail API, the default status for any test is
status_id: 3 (Untested). This status is not considered a result status, as it indicates no result information has been added to a test within a test run. With this in mind, any API method for results (get_results_for_case, get_results, get_results_for_run, etc.) would not include any tests which have a status_id of 3, even when applying a filter, as these tests would not have any result details to include.
However, the API method
get_tests would include fields for the test(s), including the current status_id, but would exclude any details about the result itself, as result details (“created_by”, “created_on”, “defects”, etc.) are result fields retrieved using other methods. You may be able to locate the untested case by using the ‘get_tests’ method for the test run along with the
Hope this helps,