Forum Discussion

josephpe's avatar
josephpe
New Contributor
2 years ago

Get the linked Test Cycle from a Test Case Key or Id using Rest API

Hi,

 

Curious to know if there is a way to get the Test Cycle to which a test case belong to using the Rest API?

 

We have process which identifies a list of test cases and need to map them to the Cycles where it belongs to, also a Test Case can be part of multiple Test Cycle from different projects.

As of now we have to scan the entire list of projects to find out this information and volume of projects is in thousands which is not an efficient mechanism. 

 

Any suggestions please?

Thanks

 

  • MisterB's avatar
    MisterB
    Champion Level 3

    You might need to contact Smartbear support for help.  I've shared a link below.

     

    I can see that the Get Test Executions endpoint will give you all instances of where a test case has been executed (this includes a status of Not Executed), but it only supplies the Execution ID and not the test cycle.  I'm assuming you could add the other endpoint: Get Test Execution to get the test cycle ID, but I'm not sufficiently experienced with using the APIs to advise.

     

    Smartbear support can be reached here: SmartBear Support

    • josephpe's avatar
      josephpe
      New Contributor

      Hi MisterB , 

      Thanks, and I will create a request with Smart Bear on this feature.

      The option you have is a work around but it is not efficient while scaling, for example when it has be searched for multiple TestCase and also imagine if TestCase(s) has a lot of executions. With the later, it becomes worse as we need to get the entire execution results to see the Cycle since each execution can be against any TestCycle.

      If you are working with .NET solution, then I have created a package which can easily communicate with Zephyr REST: https://www.nuget.org/packages/ZephyrScale.Rest.Sdk

       

      Cheers,
      Peter