I have set up a basic integration with TestRail to use the add_result_for_case API integration to post results for test cases given a runId.
I went ahead and added a caseID per automated test case since those are static, but the problem that I am running into is that when you create a test run and that test run incorporates multiple test suites, it creates several test runs with different runIds under the parent test run…
Given the API documentation, how are we supposed to use these integrations if tests may have a different runId depending on what suite they are in?
UPDATE: I did some digging around for people who had similar issues and it seems like there is not a way to do this since we used the test suites option with our project settings. This is a disappointment because our application is honestly too large to organize our test cases without the suites and at this point it would be a lot of work to re organize using the single repository option.
So what I am wondering now is if there is a way to retrieve the test suite runIds given the “parent” runId? I could potentially just iterate through those and attempt to POST results and just catch the exceptions until something sticks. I dont know if this will be a good approach but it really seems like the API just does not work as well with the suite project setup