You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
I know this query has been answered in so many post but those have not helped me. I did research, and tried, but still facing issue in making an API call to import test execution result.
Approach I took:
Trying API call using postman
Approach 1: /api/v1/import/execution/cucumber
curl --location --request POST 'https://xray.cloud.xpand-it.com/api/v1/import/execution/cucumber' \
--header 'Authorization: Bearer $token’ \
--header 'Content-Type: application/json' \
--data-binary '@/Users/aranjan/Downloads/cucumber.json'
Error:
{ "error": "Error creating Test Execution - Team is required."}
Now, this means it is trying to create new instead of update existing
Then, I used
Approach 2: /api/v1/import/execution/cucumber/multipart
curl --location --request POST 'https://xray.cloud.xpand-it.com/api/v1/import/execution/cucumber/multipart' \
--header 'Authorization: Bearer $token’ \
--form 'info=@/Users/aranjan/Downloads/xrayresultimport.json' \
--form 'result=@/Users/aranjan/Downloads/cucumber.json'
Error:
{ "error": "Unexpected field (result)"}
xrayresultimport.json
{
"fields": {
"project": {
"key": "HYP"
},
"customfield_10962": [
"Team","TeamQAAuto"
],
"issuetype": {
"id": "10722"
}
}
}
Approach 3: /api/v1/import/execution
curl --location --request POST 'https://xray.cloud.xpand-it.com/api/v1/import/execution' \
--header 'Authorization: Bearer $token’ \
--header 'Content-Type: application/json' \
--data-raw '{
"testExecutionKey": "HYP-3313",
"info" : {
"startDate" : "2020-09-25T11:47:35+01:00",
"finishDate" : "2020-09-25T11:53:00+01:00",
"testPlanKey" : "HYP-3341"
},
"tests" : [
{
"testKey" : "HYP-3330",
"start" : "2020-09-25T11:47:35+01:00",
"finish" : "2020-09-25T11:50:56+01:00",
"comment" : "Successful execution",
"status" : "PASSED"
}
]
}'
{ "error": "Error updating Test Execution - Issue update failed!"}
Agenda:
I want to import the execution result in my existing Test Execution.
I request you to guide me here.
Thanks in advance.
There is still an alternative way to upload test results, which involves multiple cucumber JSON files. These JSON files contain an array of feature test results. Instead of uploading multiple files or merging them sequentially, you can merge the first array in all the test results to form a JSON file that contains an array of all the test results. After that, you can try to invoke the API to upload the test results. This will create a single test execution with all the test results from different feature files.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the multipart endpoint always creates new Test Execution issues. The standard endpoint allows you to update an existing one or create new ones.
So, currently, there isn't a solution for updating results on an existing Test Execution while at the same time customize fields on the Test Execution.
Remember that you can always reach out Xray support and the team will support you throughout the issue you're facing and others.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would recommend also to vote on this suggestion related to this: https://jira.xpand-it.com/browse/XRAY-6221
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Sergio Freire - Xblend for this insight.
the multipart endpoint always creates new Test Execution issues. The standard endpoint allows you to update an existing one or create new ones.
I have attempted this in my Approach 2. And for this also, I am getting error.
As updating card is not going to give me desired result, I wanted to work on multipart approach.It would be a great help if you let me know where am I going wrong with multipart approach.
the multipart endpoint always creates new Test Execution issues. The standard endpoint allows you to update an existing one or create new ones.
Updating card is falling for me as I have a custom field in the Test Execution issue type. Understood.
I have voted on the raised issue.
Thanks for your support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll need to provide us more information so I recommend you reach out Xray support and the team will be glad to help you out.
Best Regards,
Sérgio.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.