You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Xray at the moment doesn't have any direct way to transfer information between Cloud and Server.

This article will guide with some steps on how to perform that task manually.

1 - How to export the tests with steps from Xray cloud

To export the Tests with steps you can use the GraphQL, with that you can ask exactly what you need and nothing more.
To make a request to Xray's GraphQL API, for starters you need to be authenticated using the same end for [Rest API authentication|https://confluence.xpand-it.com/display/XRAYCLOUD/Authentication+-+REST]. As an HTTP client, we use [Insomnia|https://insomnia.rest/graphql/] that is native with GraphQL support. After the connections been made, use our [GraphQL schema documentation|https://xray.cloud.xpand-it.com/doc/graphql/] that provides the queries to get data from Xray.

For this example, we will want to export the Tests with steps, and this section will help you with that, [GetTests|https://xray.cloud.xpand-it.com/doc/graphql/gettests.doc.html].

2 - How to change the format the Xray server can accept

After exporting, on the Insomnia Screen, you will get the information that you requested of test and steps. Between does lines, when you find parts likes this:



This means this is a Test! So that is the information that will be used to for the CSV.

NOTE: The summary of each test will not be exported; it will need to be filled manually by checking each ID and comparing with the test ID of result of GraphQL:



(need to move the mouse over the edit button then it will show you on the bottom of the screen the key Id)

I mention the field summary because it a field that is needed to have when using the Test Case Importer!

The next step is to add that information to an excel that meets this test case structure:


Using the example that I have been giving, it will be something like this:



After this, save in a CSV format:



Press "Yes"

  • 3- How to import it with the corresponding steps

When we have the CSV with all the information of the Tests, we can start to Import the information the server version. To do that you can use the Xray's Test Case Importer (a Jira Importer Plugin extension) to import Manual Tests from a CSV source file.

Lets then go to the Test Case Importer, and edit the options:


Select the project that you wish to import:



Map the fields with fields from the CSV:



Press Next and you, the import will start.

The ending result will be this (again with example issue):



Link for related documentation
Authentication - REST
Insomnia
GraphQL schema documentation





  • No labels