Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

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

...

To export the Tests with steps, you can use the GraphQL API, with that which 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 Insomnia which is native with GraphQL support. After the connections have been made, use our [GraphQL schema documentation|https://xray.cloud.xpand-it.com/doc/graphql/] that Xray's GraphQL Schema Documentation which 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].Get tests.

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 like this:



This means this is a Test! So that is the information that will be used

...

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 it with the test ID of the result of GraphQL:

Image Modified

(Users will need to move the mouse over the edit button, then it will show you on the bottom of the screen the

...

Issue ID)

I mention the field summary because it is 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:

Image Modified


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

Image Modified


After this, save in a CSV format:


Image Modified


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

...

data into 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:

Image Modified


Select the project that you wish to import:

Image Modified

Map the fields with fields from the CSV:

Image Modified

Press Next and

...

the import will start.

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

Image Modified

Link for related documentation

...

Rest API authentication

Insomnia

...

Xray's GraphQL Schema Documentation