Forums

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

Count NA-PASSED test steps using Jira Automation (Xray API)

Naresh Sampath
December 22, 2025

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?

0 answers

Suggest an answer

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

Atlassian Community Events