Add Existing Test Execution to existing Test Plan via API

Dan Bitton
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!
August 26, 2024

Hi,

I'm trying to Add Existing Test Execution to an existing Test Plan via API
here is my code

 

    url = f"https://xray.cloud.getxray.app/rest/raven/1.0/api/testplan/{test_plan_key}/testexecution"

    xray_headers = {
        "Content-Type": "application/json",
        "Authorization": f"Bearer {xray_token}"
    }

    payload = {
        "keys": [test_execution_key]
    }
   
    jira_response = requests.post(url, headers=xray_headers, json=payload)
Can anyone assist ?

2 answers

1 accepted

1 vote
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2024

Hi @Dan Bitton 

I guess you mixed up documentations. I can‘t find any endpoint in the cloud version of xray rest api.

Unfortunately (as far as I know) the Rest API isn‘t capable.

Nevertheless there is a very powerful graphQL API. See the following mutation call:

https://us.xray.cloud.getxray.app/doc/graphql/addtestexecutionstotestplan.doc.html

 

Best

Stefan

 

0 votes
Ryan Brailey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 27, 2024

As Xray is a third-party app, you may like to reach out to the vendor here with this query:

 

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

Suggest an answer

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

Atlassian Community Events