Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update test case fields when using https://xray.cloud.xpand-it.com/api/v1/import/execution

Niall O'Shea
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 19, 2020

I'm trying to automate the import of junit tests into XRay in jira cloud using the "/api/v1/import/execution/junit/multipart" service

I've got the result file from the test execution and I've create a json file for the test execution fields (labels, components,etc) and another json file for the test case fields. The test case json looks like this:


 

{
"fields": {
"project": {
"id": "10094"
},
"reporter": {
"id": "5d71313eb605d80dc014d6b6"
},
"assignee": {
"id": "5d71313eb605d80dc014d6b6"
}
}
}


When I call the rest service it runs successfully and returns the details of the execution record created. When I check the Jira UI, I can see the execution record (with the values set from the json file) and I can see see each of the tests in the junit result was created. However none of the values from the test case json file has been set. Is there something wrong with this documentation https://confluence.xpand-it.com/display/XRAYCLOUD/Import+Execution+Results+-+REST#ImportExecutionResultsREST-JUnitXMLresultsMultipart and am I missing something from my json file ?


I noticed it works when the test doesn't already exist and is created during the import. But if the test case already exists then it doesn't update the test case with values in the fields. Is there a way I could first the update

1 answer

0 votes
José Domingues _Xray_
Atlassian Partner
April 6, 2020

Hi Niall, 

This is a very specific case that we have to analyze with more data. Can you please contact us through our Service Desk? We have to make tests to understand the question.

Thank you!

Best Regards, 

Team Xray

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events