JQL to retrieve all X-Ray Tests (and their status) for each Test Execution within a Test Plan

Jimmy McMahon August 23, 2022

Good afternoon.  I hope that you are well.

I would like to understand if the following is possible via a JQL query please :-

For any given Test Plan ID, retrieve a list of all X-Ray Tests linked to each Test Execution within the Test Plan. 

The key metric I would like to extract is the X-Ray Test Run status within each Test Execution (not the overall Test Execution Status).

For example, if you look at any Test Plan within JIRA, there is a Total Tests section just underneath the "Tests" header.  This shows a list of all associated X-Rays and the column I need from that view is the "Latest Status" column.

I attempted some of the suggestions on this link :- Enhanced querying with JQL - Xray Server + DC - Xray (getxray.app)

however I only ended up getting back a list of the test executions and not the individual x-ray tests and their statuses.

Any help would be greatly appreciated.


2 answers

0 votes
Oumarou TRAORE
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2024

Hello , les fonctions issue in testPlanTests("DEMO-10", "DEMO-21", "DEMO-31", "DESCOPED") = Not working , quels sont les dependances à ajouter  au projet JIRA

0 votes
Sowjanya November 15, 2022

Hello Jimmy McMahon,

You can use the query in Advanced Search- 

issue in testPlanTests("DEMO-10")

where you can give the ID of your Test Plan instead of DEMO-10.

That could help you create the Overall Test results Gadget to obtain the results for Test cases linked to that particular Test Plan. 

Jimmy McMahon November 29, 2022

Thank you for the help Sowjanya, it is much appreciated.

Mason W_ Foley December 6, 2022

Which version of X-Ray is this JQL function for?  Doesn't appear to work in JIRA Cloud.

Senthil Kannan December 15, 2022

This JQL only supported in XRAY server. NOT cloud to my understanding.

Like Sowjanya likes this
Sowjanya January 6, 2023

Right! The JQL function supports in Jira server. To work in Jira Cloud we need help of extension using plugins JQL Search Extension .

To help the track of execution status, it is better to clone the test case and then create a execution. Instead of reusing existing test cases. This will also help to get the latest status of execution with the cloned test cases.

Elise Ellabban
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 21, 2023

Is there any way to expand on this query to include multiple test plans? Ideally from within the same Fix Version, but if not just by adding more test plan numbers?

issue in testPlanTests("DEMO-10", "DESCOPED") = Working

issue in testPlanTests("DEMO-10", "DEMO-21", "DEMO-31", "DESCOPED") = Not working

issue in testPlanTests("DEMO-10", "DESCOPED") OR issue in testPlanTests("DEMO-21", "DESCOPED") OR issue in testPlanTests("DEMO-31", "DESCOPED") = Working but isn't very efficient given I need to stich 13 test plans together.

Suggest an answer

Log in or Sign up to answer