Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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?

5 answers

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]

Any solution yet?

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]

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

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

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

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 

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

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,

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?

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]

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

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"

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]

This would be immensely helpful on Jira Cloud

I have the same question...

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

118 views 1 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you