I am attempting to pass a JUNIT XML test result to xray using
curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token" --data @"data.xml" https://xray.cloud.xpand-it.com/api/v1/import/execution/junit?projectKey=XTP
This should create a "generic test" result however I am receiving an error due to the description field being mandatory. {"error":"Error creating Test Execution - Description is required."}
How can this be avoided. Can the description field be non mandatory for the generic test type only or do I need to send a multipart request?
The error refers to the issue Description, which must be mandatory in your project.
So you have two options here, make the field Description optional in your project or use the multipart REST API to provide a description.
When you import a JUnit XML, it will create new Test Executions, which are based on Jira Issues. So if your project requires that the Description of issues is mandatory, Xray cannot create a Test Execution issue without a Description. So either you make it optional or you use the multipart REST API to send the Description text to be used when creating the issue (Test Execution).
Kind regards,
Rogério Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.