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
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.
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.
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.