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

Compare with Current View Page History

« Previous Version 2 Next »

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

This article will guide users by providing some steps 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 GraphQL API, with 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. As an HTTP client, we use Insomnia which is native with GraphQL support. After the connections have been made, use our 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, 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 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:



(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:


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


Select the project that you wish to import:



Map the fields with fields from the CSV:



Press Next and the import will start.

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



Link for related documentation
Rest API authentication

Insomnia

Xray's GraphQL Schema Documentation





  • No labels