Zephyr Test Execution Linking Defect via ZAPI

Hi folks ,

I am interating Zephyr via ZAPI in my application. I created test execution and a defect(bug) in jira but could not find any api in ZAPI docs for linking test execution with existing defect with my application.

Is this requirement feasible . If yes and any API exist for acheving this task then help me guys.

Version of ZAPI is :: 2.3.0.23002808

Version of Zephyr is :: 3.3.2.33202813

 

1 answer

This widget could not be displayed.

Hi Parashar

Thanks for your interest in Zephyr.

You can use the following API resource of updating the execution details to link your defect to the test execution

http://docs.getzephyr.apiary.io/#reference/executionresource/update-execution-details/update-execution-details

For example

 PUT: http://192.168.11.96:8735/rest/zapi/latest/execution/163/execute
{
  "defectList": [
    "PROJ-82"
  ],
  "updateDefectList": "true"
}

where "163" is the execution id and "PROJ-82" is the defect key

Let us know if you have any queries about the above mentioned

Thanks

ZephyrSupport

I've managed to update de Execution Status using the following REST Call

Http-Method: PUT
Endpoint: /rest/zapi/latest/execution/38/execute
{
    "status": "1"
}

But It fail when I want to link a defect to this execution:

Http-Method: PUT
Enpoint: /rest/zapi/latest/execution/38/execute
{
  "defectList": [
    "YIS-1"
  ],
  "updateDefectList": "true"
}

>>> Response:
Http-Status: 500 Unknown

This is part of the RAW response that may help to find out what the problem is


<status>
    <status-code>500</status-code>
    <message>Unexpected character ('â' (code 226)): was expecting double-quote to start field name
 at [Source: org.apache.catalina.connector.CoyoteInputStream@1b60e5d1; line: 2, column: 2]</message>

 

Regards

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

226 views 3 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you