Forums

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

Associate Test Set to Test Execution using XRAY or JIRA API

Kieran Williams
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!
February 19, 2026

I am trying to add a test set to a test execution. i can create a new execution and associate individual tests using the endpoint 

https://us.xray.cloud.getxray.app/api/v2/import/execution 

but this is tedious as the test set will be growing and changing over time.

 

I have also tried adding test sets using the endpoint

https://us.xray.cloud.getxray.app/api/v2/graphql

but it seems this only accepts testIssueIds and not testSetIssueIds

 

all the documentation i have read states that sending test sets in place of individual tests should be expanded by XRAY but i am getting multiple errors from all avenues.

 

Is there a way to associate a test set to a test execution instead of individual tests

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Prasanna Ravichandran
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 19, 2026

Hi,

In Xray Cloud, you cannot directly add a **Test Set** to a Test Execution via API.

The API only accepts individual **Test issue IDs**, not Test Set IDs.

Even though documentation mentions expansion, the system does not automatically expand Test Sets when using these endpoints.

**What you need to do instead:**

First, get all Test issues inside the Test Set

Then send those Test IDs to the execution import API

 Repeat whenever the Test Set changes

**How to achieve this:**

* Use GraphQL to fetch Tests from the Test Set

* Extract the Test issue IDs

* Pass those IDs to the execution endpoint

You can’t link a Test Set directly — you must add the Tests inside it.

Kieran Williams
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!
February 20, 2026

thank you very much for your swift answer. I will work around this the way you described.

 

this can be achieved using the JIRA/XRAY webapp UI so would be a great feature enhancement for any upcoming updates.

 

https://us.xray.cloud.getxray.app/api/internal/issuelinks/testexec/{{testExecutionKey}}/tests?extractFrom=testset

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events