Forums

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

Unable to create new Test execution using GraphQL api for XRay-Jira

shriya July 29, 2025

Hi Team,

 

For my CI/CD automation, I need to create new test execution for each environment at runtime based on the environments  available(online). Using GraphQL api command , I am trying to createTestexecution ->

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

Query

mutation{ createTestExecution(testIssueIds:["11704"] jira:{fields:{summary:"Test Execution for KERNELPROT",project:{key:"KERNELPROT"}}}){testExecution {issueId jira(fields: ["key"])}warnings createdTestEnvironments}}

 

But facing errors ->

{
"errors": [
{
"message": "Error creating Test Execution: tests, in field 'tests', with the following ids not found: 11704!",
"locations": [
{
"line": 1,
"column": 11
}
],
"path": [
"createTestExecution"
]
}
],
"data": {
"createTestExecution": null
}

--------------------------

Here : testIssueIds refer to Story id or Test plan id ?

Thanks, 

Shriya

1 answer

0 votes
Marc - Devoteam
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 Leaders.
July 30, 2025

Hi @shriya 

I'm not with Xray, but reading the error and going over the documentation, to me it seems 11704 is not an ID of a created test in Xray.

Otherwise contact Xray support

shriya July 30, 2025

Hi Marc,

Thanks for the response. 

Yes, I have added Jira ID generated for Jira key using the below command . This was requested by Xray team.

https://securweave.atlassian.net/rest/api/3/issue/<jira-key>

 

Regards,

Shriya

Suggest an answer

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

Atlassian Community Events