Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,407
Community Members
 
Community Events
168
Community Groups

Update evidences and attachments of test issue type

I am using the API provided here (https://docs.getxray.app/display/XRAY/Tests+-+REST#TestsREST-CreatingandEditingTests-JiraRESTAPI) to update my test steps. 

Here when I want to update the step level attachments I passing the JSON value like below 

"attachments":[  {            

"data": "gsddfgdsfg...(base64) ",            

"filename": "example2.txt",            

"contentType": "plain/text"       

 }]. 

But it showing me error

 

{    "errorMessages": [],    "errors": {        "Manual Test Steps""Unrecognized field \"data\" (Class com.xpandit.raven.beans.AttachmentBean), not marked as ignorable\n at [Source: N/A; line: -1, column: -1] (through reference chain: com.xpandit.raven.customfield.ManualTestStepsCustomField$TestStepSingleTransport[\"steps\"]->com.xpandit.raven.beans.InternalTestStepValueBean[\"attachments\"]->com.xpandit.raven.beans.AttachmentBean[\"data\"])"    }}

 

Can you help me how to update step level atttachments to  a TEST issuetype

1 answer

Hi @Johnson Anthony ,

  • to create Test issues you'll have to use Jira's REST API for creating isues as mentioned here . I've clarified the documentation as currently it's not possible to add attachments while creating Test issues; it has to be done afterwards
  • to *update* Test issues, namely the steps, I would recommend to use Xray specific endpoints  namely the  HTTP PUT /rest/raven/1.0/api/test/{testKey}/step as describe in

 

Just to let you know that we've created this open-source project that contains usage examples of the API available for Postman:  https://github.com/Xray-App/xray-postman-collections

This can be a good way to to see concrete examples of API calls.

 

Regards,

Sérgio

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events