We are attempting to log results to Testrail via the API (though automation). Our testruns typically have over 5k testcases that get run.
The question is how to get a testcase-id from the list of testcases that are available (that we can then add to the testrun).
We first tried to use “get_case” and iterate through each testcase in a Suite, matching the returned values to a set of criteria; basically implementing Filters though on a post-processing basis. However, depending on when the testcase was found it would cause 1N requests to Testrail in a very short amount of time; something that Testrail didn’t appreciate. So while this worked ok when our Testrun was a few 100; it started failing when it got much bigger.
Next, we tried to use “get_cases” which essentially does the above except goes out and grabs the entire suite. We would then filter them down based on some set of criteria and create our testplan. Again, for the first 1000 or so no problem. But as our testruns got to be 5k it started taking a long time (as the testcase returns ALL the information about each testcase). And around 10k testrail again stopped responding (giving us an Internal Server Error no less).
So … that leaves us with few options from the standpoint of the API. And I went looking to see how I could request testcases based on a filter or some set of criteria that Testrail could process and return us testcases only applying to that filter. I did not find any such API.
My question then is; given a Testsuite of 1000’s of testcases, how can I use the API to only grab a subset of those and add them to a Testrun?
IE: create a testrun of all testcases marked as “automated” (via the API)