Forums

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

GEt Xray Test related to Test Execution in Jira automation

Dieter Lauwers
Contributor
September 2, 2026

Hi,

Jira automation question.

I'm using https://xray.cloud.getxray.app/api/v2/graphql to get the related tests of a test execution. This works fine and I get the correct result.


{data={getTestExecutions={results=[{issueId=188800, jira={key=TEST-13621}, tests={results=[{issueId=180163, jira={key=TEST-11939, summary=Add sales order, assignee=null}}, {issueId=180164, jira={key=TEST-11940, summary=Mandatory field validation, assignee=null}}]}}]}}}


But now I want to iterate through the results/related tests.
I'm using advanced branching
and {{xrayTests.body.asJSON.data.getTestExecutions.results.first.tests.results}} as smart value.

xrayTests is a variable of {{webResponse.body}}.

But, this is not working, I get error

Advanced branching09/02/2026, 09:23:38
The provided smart value couldn't be resolved to an object


So, how can I select the results from the webresponse?


Dieter




1 answer

0 votes
Gor Greyan
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.
September 2, 2026

Hi @Dieter Lauwers

Welcome to the Atlassian Community!

The issue is likely that xrayTests contains {{webResponse.body}} as a string, so Automation can't navigate it as a JSON object. I would branch directly over the response instead.
{{webResponse.body.data.getTestExecutions.results.first.tests.results}}

Set the Advanced Branch variable to something like xrayTest.
Inside the branch you can then use
{{xrayTest.jira.key}}
{{xrayTest.jira.summary}}

If you need to keep xrayTests as a variable, convert it first using jsonStringToObject().

{{jsonStringToObject(xrayTests).data.getTestExecutions.results.first.tests.results}}

Regards,
Gor

Suggest an answer

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

Atlassian Community Events