Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Getting error "Result is not valid Xray Format" while importing result with custom fields values

Oleg Shtilerman
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!
June 16, 2024

Hi!

Trying to import test execution results using XRAY API.

Without custom fields values it works well:

Payload ={'info': {'testPlanKey': 'LQ-000', 'description': 'DDDDD', 'summary': 'Regression summary', 'version': '', 'startDate': '2024-06-16T07:40:26+0000', 'finishDate': '2024-06-16T07:40:29+0000'},

'tests': [{'testKey': 'LQ-1474', 'status': 'PASSED'}, {'testKey': 'LQ-1475', 'status': 'PASSED'}]}

But if I tried to add custom fields values, got the error:

Payload = {'info': {'testPlanKey': 'LQ-000', 'description': 'DDD', 'summary': 'Regression summary ', 'version': '', 'startDate': '2024-06-16T07:40:26+0000', 'finishDate': '2024-06-16T07:40:29+0000'},

'tests': [{'testKey': 'LQ-1474', 'status': 'PASSED', 'customFields': [{'id': 11723, 'value': ['2024.1.10.1.5.RC.1']}]}, {'testKey': 'LQ-1475', 'status': 'PASSED'}]}

 

The error is: 

'{"error":"Result is not valid Xray Format"}'

Please help.

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Francisco Fonseca _Xray_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2024

Hi @Oleg Shtilerman , 

Welcome to the Community.

 

I would suggest you contact our Support through this Portal. They can assist you with this.

 

Still, the errors you mention suggest you are not using the correct Xray JSON format. Do you want to take a look at this article from our documentation:  

https://docs.getxray.app/display/XRAYCLOUD/Using+Xray+JSON+format+to+import+execution+results#UsingXrayJSONformattoimportexecutionresults-customfield 

 

Best

Francisco - Xblend

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events