Forums

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

Getting error "Result is not valid Xray Format" while importing result

Qautomation March 11, 2023

Hi i am trying to import result to existing test execution but i am getting "Error:

Result is not valid Xray Format" , response code - 400. 5 days back it was working fine.
{
    "testExecutionKey""QAUT-8",
    "tests" : [
        {
            "testKey" : "QAUT-3",
            "start" : "2023-03-12T08:35:35+01:00",
            "finish" : "2023-03-12T08:40:35:56+01:00",
            "comment" : "Successful execution",
            "status" : "PASSED"
        }
     ]
}
Please help .
Xray_Rest_API_Issue.png

1 answer

0 votes
Carlos Garcia Navarro
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 12, 2023

Hi @Qautomation , 

Welcome to the Community! Your example looks good per the Xray documentation ( https://docs.getxray.app/display/XRAY/Import+Execution+Results#ImportExecutionResults-XrayJSONSchema)

Are all the results failing to import, or there are some that import correctly? Did anything change in your Jira configuration in the last 5 days?

You can also contact Xray support: https://marketplace.atlassian.com/apps/1211769/xray-test-management-for-jira?tab=support&hosting=cloud

Qautomation March 13, 2023

Thanks @Carlos Garcia Navarro 

I am importing only single result .1 week ago , all was working fine but now neither i am able to create a new test execution or update a test execution for importing results . I tried both rest api version v1 and v2. I have also tried through the curl command but every time i am getting the same error message "Result is not valid Xray Format".I checked for subscription which looks fine also. 

Qautomation March 14, 2023

it is resolved as there was typo mistake in finish date "2023-03-12T08:40:35:56" whereas it should be 2023-03-12T08:40:35

 

{
    "testExecutionKey""QAUT-8",
    "tests" : [
        {
            "testKey" : "QAUT-3",
            "start" : "2023-03-12T08:35:35+01:00",
            "finish" : "2023-03-12T08:40:35:56+01:00",
            "comment" : "Successful execution",
            "status" : "PASSED"
        }
     ]
}
Like # people like this
Carlos Garcia Navarro
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2023

Aaah! You're right! Thanks for sharing! 

Domantas Kraujutis
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 29, 2023

Hi, @Carlos Garcia Navarro and @Qautomation - do you happen to know how should the json payload look like if we want to create a NEW test execution containing 0 tests?

I would like to add those tests to the created test execution later on in my automation.

Here is what I tried but unfortunately receiving 400 response code. I have correct testPlanKey (if I add an object to "tests" array I can successfully create new test execution with that test, but it's not what I want). The endpoint I'm using is https://xray.cloud.getxray.app/api/v2/import/execution


{
  "testExecution": {
    "info": {
      "summary": "Summary",
      "description": "Description",
      "testPlanKey": "NWQ-123"
    },
    "tests": []
  }
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events