I'm trying to retrieve all tests from a Jira project. I tried retrieving the tests using the Jira API but I encountered a problem where the Jira API always returns ALL 9000 tests even if I set the max number of returned items to 200. However, the issue doesn't happen when I try to retrieve other issue types (epic, bugs, etc.). My questions are...
Is the Jira API the right api to retrieve Tests? Or do I need to use ZAPI?
Is there a setting where you can set the maximum number of returned tests for paging?
If I need to use ZAPI, then what endpoint do I need to use? I don't see any endpoint I could use.
We already use ZAPI to retrieve the test executions. In fact we have another topic asking about test executions.
So our questions are
We used the Jira API to retrieve Tests (not Test Executions) and it returned ALL Tests even if we provided the maxRecords parameter which should have paged the results. Paging works when you try to retrieve all the other Jira types.
Is there a system setting, outside of the api, where you can set the default maximum number of items returned by the API?
Test issue type is one of the issuetype in jira like story, bug, epic etc. So to fetch the testcases you have to use the JIRA Api. I'm able to get the proper results from jira for "Test" issue type. There is no api from ZAPI to fetch the test cases, zephyr also uses jira api to fetch the test case details, since its stored at jira end
Attached the sample request and response for your reference
Note: if we keep changing the max results and startAt values, you can get proper results