I am attempting to import a list of test case execution results to a JIRA project using the Xray REST API.
Using the Xray JSON format I have successfully uploaded execution results for existing tests without Custom Fields info. Unfortunately I have not been able to upload results with Custom fields.
The JSON used for the successful upload attempt is:
{'info': {'testPlanKey': 'LQ-1651',
'description': 'Start time: 2024-06-09T10:16:28+0000\nFinish time: 2024-06-09T10:16:46+0000',
'summary': 'Regression summary: dev: Passed 2 from 3',
'version': '',
'startDate': '2024-06-09T10:16:28+0000',
'finishDate': '2024-06-09T10:16:46+0000'},
'tests': [{'testKey': 'LQ-1474', 'status': 'PASSED'},
{'testKey': 'LQ-1475', 'status': 'PASSED'}]}
Json #1 with Custom Fields info:
{'info': {'testPlanKey': 'LQ-1651',
'description': 'Start time: 2024-06-09T10:16:28+0000\nFinish time: 2024-06-09T10:16:46+0000',
'summary': 'Regression summary: dev: Passed 2 from 3',
'version': '',
'startDate': '2024-06-09T10:16:28+0000',
'finishDate': '2024-06-09T10:16:46+0000'},
'tests': [{'testKey': 'LQ-1474',
'status': 'PASSED',
'customFields': [{'id': '11723', 'value': ['Local']}]},
{'testKey': 'LQ-1475', 'status': 'PASSED'}]}
Resonse text is: "error":"Errors processing custom fields of Test 1: Invalid custom field with id 11723."
Another version:
{'info': {'testPlanKey': 'LQ-1651',
'description': 'Start time: 2024-06-09T10:16:28+0000\nFinish time: 2024-06-09T10:16:46+0000',
'summary': 'Regression summary: dev: Passed 2 from 3',
'version': '',
'startDate': '2024-06-09T10:16:28+0000',
'finishDate': '2024-06-09T10:16:46+0000'},
'tests': [{'testKey': 'LQ-1474',
'status': 'PASSED',
'customFields': [{'id': 11723, 'value': ['Local']}]},
{'testKey': 'LQ-1475', 'status': 'PASSED'}]}
Response text: {"error":"Result is not valid Xray Format"}
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:
Best
Francisco - Xblend
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.