Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Xray: Unable to import test execution with test cases using JIRA api.

Zaid Momin November 28, 2021

Hello,

Hope you are doing well!.

I'm trying to import test execution with a few test cases but unable to do so.

APIapi/v1/import/execution/

Input JSON file content

{
"tests": [
{
"testKey": "TK-0001",
"status": "FAILED",
"comment": "Error: expected 400 \"Bad Request\", got 200 \"OK\". Along with some json string."
}
],
"info": {
"summary": "Automated TestExecution for release V1.2",
"description": "This execution is automatically created when importing execution results from an external source"
}
}

Response

{"error":"Error creating Test Execution - Issue create failed!"}

NOTE: As per the documentation, https://docs.getxray.app/display/XRAY/Import+Execution+Results+-+REST#ImportExecutionResultsREST-XrayJSONresults, If I do not provide testExecutionKey , a new test execution would be created using info object and all the tests in tests object would be associated to it.

I'm not sure if I'm doing something wrong. Your inputs would be highly appreciated.

Thanks,

Zaid

2 answers

1 vote
Zaid Momin November 29, 2021

But I see another issue. My execution is created along with tests. But tests do not have the comment though I send it in the request. 

Could someone please help and let me know why!

0 votes
Zaid Momin November 29, 2021

Hi,

The issue was on my side. I was using the client_id and client_sceret of the user that did not exists.

Thanks,

Zaid

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events