We have number of test cycles which contain many test cases each.I need to get the exact count of test cases in a particular test cycle . i have the following query :
curl -v -u username:password -H "Content-Type: application/json" -X GET ALL 'https://jira.domain.com:port/rest/api/2/search?zql=project = "ABC" AND fixVersion = "6.5" AND cycleName in ("SPCC-P1.4.2")'
The result of the above query in json gives a field "total" but it displays the number of times the test cycle were executed. i need the number of test cases in the test cycle. Any help appreciated Thanks
To retrieve the count of test cases in the test cycle, you might have to use the zapi for jira add-on . Test Cases or Executions as they are called in Jira cannot be retrieved from the query you mentioned as far as i know. Please refer : ZAPI DOC
/rest/api/2/project : will give the project Id of the projects.
/rest/api/2/project/"projId"/versions : will fetch you version id's
/rest/zapi/latest/cycle?projectId="projId" : will fetch the test cycles with their id's.
Finally /rest/.../latest/cycle?projectId="id"&versionId="id"&cycleId="id" : should fetch you a field "totalExecutions" which is the total number of test cases in that cycle.