I am using a Jira Cloud Automation rule with Send web request to call the Xray GraphQL API getTestRunById, and the response is returned correctly.
I have added new Test Step statuses in Xray:
NA-PASSED
NORUN
PASSWSCRIPTERROR
I want to count how many test steps have the status NA-PASSED.
I created a variable using this smart value:
{{#webResponse.body.data.getTestRunById.steps}}
{{#if(equals(status.name, "NA-PASSED"))}}
{{status.name}}
{{/}}
{{/webResponse.body.data.getTestRunById.steps}}
The log output shows:
NA-PASSED NA-PASSED NA-PASSED NA-PASSED
Instead of listing the values, I need the count (for example: 4).
Using size did not work.
How can I get the count of NA-PASSED test steps using Jira Automation smart values?