cancel
Showing results for 
Search instead for 
Did you mean: 

Test Issue Type

kbalcora
Occasional Contributor

Test Issue Type

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...

 

  1. Is the Jira API the right api to retrieve Tests? Or do I need to use ZAPI?
  2. Is there a setting where you can set the maximum number of returned tests for paging?
  3. If I need to use ZAPI, then what endpoint do I need to use? I don't see any endpoint I could use.

Thanks,

Chev Balcora

Tags (2)
4 REPLIES 4
BibekBehera
Staff

Re: Test Issue Type

Hi @kbalcora ,

 

You can use the api listed for the ZAPI from the below link.

https://getzephyr.docs.apiary.io/

 

Please note that zapi is completely free and you are just a request away to validate if zapi is installed and the apis are working as expected.

 

https://getzephyr.docs.apiary.io/#reference/licenseresource/get-license-status-information/get-licen...

Please note that for the recent versions of zapi it is not necessary to have zapi installed as the end points are already exposed.

 

Regards,

Bibek

kbalcora
Occasional Contributor

Re: Test Issue Type

We already use ZAPI to retrieve the test executions. In fact we have another topic asking about test executions.

 

So our questions are

  1. 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.
  2. Is there a system setting, outside of the api, where you can set the default maximum number of items returned by the API?

Re: Test Issue Type

Hi @kbalcora 

 

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

Please refer jira documentation for more details: 
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-s...

Thanks

Jagadeesh

TanyaYatskovska
Community Manager

Re: Test Issue Type

Thanks for the help, Jagadeesh, Bibek!

@kbalcora, do the suggestions posted here help you resolve the issue? Please share with the Community the solution you decided to use.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Top Kudoed Authors