How to find XRay Tests in Test Execution (Jira Cloud)

kamal shaharier December 30, 2019

Hi,

Per the latest docs on XRay for Jira Cloud: https://confluence.xpand-it.com/display/XRAYCLOUD/Enhanced+querying+with+JQL

Specific functions are not implemented. 

Before migrating to Jira Cloud we used the testExecutionTests function from XRay server as described in https://confluence.xpand-it.com/display/public/XRAY/Enhanced+querying+with+JQL

How is it possible to get the same result set in Jira Cloud?

8 answers

1 vote
Karol Krasňan January 13, 2022

Our company just migrate to Jira Cloud and its huge disappointing. Jira cloud is only miserable shadow against jira server.

Rogério Paiva - Xray Xporter
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.
January 21, 2022

Hi @Karol Krasňan 

I am sorry to hear about your disappointment.
Yes, the Xray Cloud and Xray Server are two different apps since the architecture is different.
On the server, all apps run inside the same server. On the cloud, it is a distributed architecture where Jira is running on one server, Xray in another, and all other apps on the respective vendor servers.
Because of this distributed architecture, we could not provide the exact same user experience and feature as you find on the server. So moving from server to cloud will require some adaptation into the new way of doing things and the new features. Still, there are some improvements in the user experience we made in the cloud, so we believe the cloud also has its merits.

Please get in touch with Xray Support (http://Xraysupport.getXray.app) to share your experience with us so that we can look for solutions that could fit your needs.

Thank you.

Kind regards,
Rogerio Paiva [Xray Support Team]

Ursula Beiersdorf
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!
December 6, 2023

If I had known upfront, I also might not have chosen Xray. I could have found out, but cannot imagine.

Also while I understand that Jira and Xray are on different servers, I cannot understand that queries that would happen within the xray world cannot be implemented. Testplan tests, testexecutionsTests.

If you created a gadget with input a query for test plans, and output the run results for each testplan (as is currently done in the overall test results gadget), then I would be glad already. The plan metrics and alike  do not help as they a) do not consider correctly if a test is in two test plans, and b) do not summarize up. 

Kind regards

Ursula

0 votes
Ranjan Lamichhane
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!
December 8, 2023

The documentation location referenced in the answer has changed FYI, the new location is here:

https://xray.cloud.getxray.app/doc/graphql/index.html

0 votes
Ozan C_ March 17, 2023

Hi,

Is there a way to get only failed tests in a test execution using GraphQL ?


0 votes
Rogério Paiva - Xray Xporter
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.
October 14, 2021

Hi @Alysha Kester-Terry and @lucia.plaza 

However, it is possible to have the result you need by using GraphQL (with a query similar to the reply I gave Julien Messer above) or using a report like Test runs List:

https://docs.getxray.app/display/XRAYCLOUD/Test+Runs+List+Report

Any additional questions, please get in touch with Xray Support (http://xraysupport.getxray.app); we would gladly assist you.

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

0 votes
Maksym_Kuchuran June 30, 2021

Any solution yet?

Rogério Paiva - Xray Xporter
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 1, 2021

Hi @Maksym_Kuchuran 

Yes, due to the architectural differences, in Cloud, the Apps run in a server outside the Jira server, so we don't have JQL functions.

As an alternative, please use the Test Runs List report:  

https://docs.getxray.app/display/XRAYCLOUD/Test+Runs+List+Report

It provides additional detail since it will list at the Test Run level; however, all the Tests will be there. It is possible to filter by several fields, including Test Execution keys, using saved filters.

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

Maksym_Kuchuran July 2, 2021

Thanks for your  reply @Rogério Paiva - Xray Xporter 

I have already checked Test Run report previously, even though it looks nice and is pretty informative for my goal it does not suit unfortunately

I want to use JQL to pick needed Tests and pass their ids further to other system using Jira automation trigger Send Web request action 

So when user executes trigger on Test Execution issue type i need to gather all Tests that are in that execution through JQL and put them in body of web request

Daniel Turczanski - __JQL Search Extensions
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 2, 2021

Are you using Jira links with Xray? What's the structure?

Isn't the solution to use JQL and query with the link relations?

Like Cedric Daviaud likes this
Maksym_Kuchuran July 2, 2021

Hi @Daniel Turczanski - __JQL Search Extensions 

Unfortunately there is no "link" relationship between Test Execution and Tests inside that execution,  it is handled in some different way i guess

i was trying to get all the metadata for certain Test or Test Execution to possibly find the connection but didn't succeed 

Rogério Paiva - Xray Xporter
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 7, 2021

Hi @Maksym_Kuchuran 

Would it be an option to use an API?

Xray has a GraphQL API that allows retrieving most of Xray's information.

Please check the documentation: https://docs.getxray.app/display/XRAYCLOUD/GraphQL+API

And try the query getTestExecution, here is the documentation for the query: https://xray.cloud.xpand-it.com/doc/graphql/gettestexecution.doc.html On this page, you will find an example to retrieve the Tests related to the Test Execution.

In case you want to get several Test Executions at once, based on JQL, there is also this query getTestExecutions, and here is the respective documentation: https://xray.cloud.xpand-it.com/doc/graphql/gettestexecutions.doc.html

I hope this helps.

Kind regards,
Rogério Paiva [Xray Support Team]

Like Julien Messer likes this
Maksym_Kuchuran July 8, 2021

Hi @Rogério Paiva - Xray Xporter , this looks very nice, i've read through docs and looks like it can do the trick, let me try it

Thanks for your support,

Julien Messer September 28, 2021

Hi, I have a similar need and was able to use the GraphQL query as described in the documentation. Despite this I am struggling to findout how to search for all TestExecutions for a particular TestPlan (...as the TestPlan reference is not a Jira field).

Finally I found with the following query a way to get the TestPlan information, now I am looking for a way to filter accordingly:

      query = "{ \"query\": \"{ "
        + "getTestExecutions(jql: \\\"project = 'DI'\\\", limit: 1) { "
          + "total start limit results { issueId "
            + "testPlans(limit: 1) { "
              + "total start limit results { issueId "
                + "jira(fields: [\\\"summary\\\", \\\"key\\\"]) "
                + "} "
              + "} "
            + "jira(fields: [\\\"summary\\\", \\\"key\\\"]) "  
            + "} "
          + "}"
        + "} \" }";

Does anybody have a hint?

Rogério Paiva - Xray Xporter
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.
October 14, 2021

Hi @Julien Messer 

You can use the getTestPlan query like this:

gettp.png

{
getTestPlan(issueId: "18008") {
issueId
tests(limit: 100) {
results {
issueId
testType {
name
}
}
}
testExecutions(limit: 100) {
results {
issueId
testEnvironments
lastModified
}
}
}
}

 

And you will get the Test Executions like this:

gettpres.png

 

In the documentation (https://xray.cloud.getxray.app/doc/graphql/gettestplan.doc.html), you can navigate through the elements that you can be used in the query.

Please check the steps I use below:

 

doc1.pngdoc2.pngdoc3.pngdoc4.png

 

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

Julien Messer October 14, 2021

Thank you Rogério for your help, the way you describe is working fine for me.

0 votes
Joao Nuno Madeira Machado October 7, 2020

i miss this feature so much in jira cloud :( being able to list and export the results of a test execution with i"ssue in testExecutionTests"

Rogério Paiva - Xray Xporter
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.
October 14, 2021

Hi @Joao Nuno Madeira Machado 

Since Jira Cloud architecture is different from Server/DataCenter, it is impossible to have the same features.

However, it is possible to have the result you need by using GraphQL (with a query similar to the reply I gave Julien Messer above) or using a report like Test runs List:

https://docs.getxray.app/display/XRAYCLOUD/Test+Runs+List+Report

Any additional questions, please get in touch with Xray Support (http://xraysupport.getxray.app); we would gladly assist you.

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

0 votes
Alysha Kester-Terry September 15, 2020

This would be immensely helpful on Jira Cloud

0 votes
lucia.plaza August 31, 2020

I have the same question...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events