Forum Discussion

saketmahajan's avatar
saketmahajan
New Contributor
2 years ago

Zephyr API to get details of Test Cases under a Test Cycle

Hi,

I would like to know if there is an API that I can use to get the details of test cases under a Test Cycle?


I looked at one solution which mentions using Test Eexecutions API (ref: https://community.smartbear.com/t5/Zephyr-Scale-Questions/Zephyr-API-to-get-list-of-Test-Cases-under-a-Test-Cycle/m-p/237454#M1712) but it only seems to show Test Case Id and Link.

I was interested in additional fields from the Test case like:

  • Key
  • Name
  • Objective
  • Labels
  • Custom Fields.

Please help me with a solution.

  • josephpe's avatar
    josephpe
    New Contributor

    I was looking into their API documentation but even after 2 years they haven't introduced this feature, I can see there are links to test plan and issue links but not the vital one which is Test Cases.

    It can be argued to fetch from execution, but it's not efficient when it comes to large volume as saketmahajan said, it can affect rate limits increase calls on the server side and most importantly time consuming process.

    Hope Smart Bear prioritizes this and add this as a feature!

     

  • MisterB's avatar
    MisterB
    Champion Level 3

    Hi,

     

    I'm assuming it's possible to script a solution by using a couple of API calls: one to get the test cases IDs within in a cycle, and another to enumerate through the test case list to get the test case data you want.  I've not done this so can't recommend, but I think that's the route to go down.

     

     

    • saketmahajan's avatar
      saketmahajan
      New Contributor

      That's what I was assuming. I was looking at something I can get from just 1 API call directly from Zephyr to avoid any rate-limiting errors.

      • MisterB's avatar
        MisterB
        Champion Level 3

        I think SmartBear support can help with that request.  You can reach them here on their support portal: SmartBear Support