Forum Discussion

Sankalan's avatar
New Contributor
4 years ago

Using Zephyr Standalone API to post Testcase Execution Details

Hi !! Need details on how to use Zephyr API to post Automated Test Execution Status, TC Name and Report under a particular Regression Cycle.
What are the API’s that need to be called sequentially?
Currently we are using Zephyr Standalone application for storing Manual Testcases only.

3 Replies

  • Hi,

    The best way to maintain your automation results is using vortex feature in zephyr standalone. Please refer
    You can post the results to existing cycle/new cycle

    Also if you want to do it using rest api you can refer the API documentation

    Create testcase api, create execution schedule, execute testcase api are required for posting to existing cycle

    For new cycle you need to use create cycle, add phase to cycle, create execution schedule, execute testcase apis is required

    • Sankalan's avatar
      New Contributor

      JagadeshMadhura : Thanks for your response.


      We are currently exploring Zephyr Rest API option for posting Test Case Execution Results in Zephyr since using Vortex requires Server-side configuration.


      We have below queries related to Zephyr Rest API :-


      Create TestCase API (http://localhost:80/flex/services/rest/latest/testcase/)

      • From where can we get the value for tcrCatalogTreeId parameter? Other than this parameter, what are the other mandatory fields in the Request Payload?


      {"tcrCatalogTreeId":5,"testcase":{"name":"name","automated":false,"requirementIds":[],"releaseId":1,"customProperties":{}},"getOriginal":true,"revision":0,"stateFlag":1,"lastModifiedOn":"Jun 3, 2016 12:12:50 PM"}


      • Do we need to call a separate API to get the value for tcrCatalogTreeId parameter?
      • What is the use of stateFlag in the Request Payload?

      Create Execution Schedule API (http://localhost:80/flex/services/rest/latest/execution/)

      • What value we will use for tcrCatalogTreeId parameter in Request Payload?
      • What are the other mandatory fields in the RequestPayload


      {"id":4,"tcrCatalogTreeId":3,"testcase":{"id":4,"name":"Testcase4","externalId":"","description":"","status":"","priority":"1","tag":"Fast, Tie","lastModifiedOn":"Feb 26, 2016 12:00:00 AM","creationDate":"Jul 15, 2013 12:00:00 AM","comments":"","isComplex":false,"estimatedTime":600,"writerId":0,"creatorId":1,"tcStepsVersion":"","lastUpdaterId":0,"temp":false,"oldId":0,"automated":false,"scriptId":"","scriptName":"","scriptPath":"","requirementIds":[],"attachmentCount":0,"releaseId":1,"customProperties":{}},"getOriginal":true,"revision":0,"stateFlag":0,"lastModifiedOn":"Feb 26, 2016 12:00:00 AM"}



      Execute TestCase API (http://localhost:80/flex/services/rest/latest/execution/bulk?scheduleids=&status=&testerid😃

      • Is this API meant for Bulk Test Case Execution Status update?
      • Is there a provision to update Execution Status of Individual TestCases?
      • What values we need to pass for the Request Payload parameters i.e. ids and selectedAll?





      Create New Cycle (http://localhost:80/flex/services/rest/latest/cycle/)

      • What are the mandatory fields in the RequestPayload
      • What values are expected for status param?


      {"name":"zephyr","startDate":"Jul 6, 2016 3:13:08 PM","endDate":"Jul 6, 2016 3:13:08 PM","status":1,"releaseId":4,"cyclePhases":[],"createdOn":"Jul 6, 2016 3:13:08 PM"}



      Create Cycle Phase (http://localhost:80/flex/services/rest/latest/cycle//phase)

      • Do we need to provide the value for scheduleId in URL param?
      • How can we orchestrate/map Cycle, Phase, Schedule & TestCase?
      • Since this a POSt request, what Payload needs to be passed here?

      It will be very helpful if you can share us a REST API Project having all the above APIs orchestrated together. So that we can get an idea on how it works.