Jira XRay - Importing TestSets and their Tests associations with Jira import feature ?

Vincent MASSIP May 17, 2016

Hi there,

We are currently migrating our tests from QC to Jira-XRay.

I've seen the REST API, but is it possible to import testsets and their tests associations using the Jira/XRay import feature with a csv or json file ?

Thank you

2 answers

1 accepted

1 vote
Answer accepted

Hello Vincent,

There are two ways you can do this:

  1. Using the JIRA CSV Import tool;
  2. Using Xray REST API.

Depending on what you want to do you are going to want to use one or the other.

The first solution is the best if you want to create new Test Sets and have the Test association right away and it uses JIRA CSV Tool, to do this check the following CSV file , to create a new Test and associate a Test to it all you have to do is change the issue type id to your Test Set issue type and the Test key (value in link1 column) to the Test key you want to associate. The limitation of this solution is that if you want to associate more than 1 test to the test set you are going to need to have one Link1 column for each test.

The second solution requires that you already have the Test Sets created and all you have to do is associate the Tests to the Test Set using the POST Method for the Test Sets, for more imformation about the REST API operation check http://confluence.xpand-addons.com/display/XRAY/Test+Sets+-+REST.

Let me know if you need a more detailed CSV file or an example on how to use the Rest Api.

 

Best Regards,

André Rodrigues

Vincent MASSIP May 18, 2016

Thank you André.

I am currently importing tests, test steps and testsets with the JIRA Admin Import/Export tool, using a CSV file for input. That way, I can set up the import and map fields.

This CSV file is from a XLSM file that extract HPQC datas, with scripting for extraction and formating stuff...
The script is setting up all the issue-keys. That way I can keep all the 'Call To Tests' links.

Problem is that with this CSV solution, I don't see the 'Link1' mapping field in the JIRA Admin Import/Export screen. Is there something that I've missed ?

Never the less, it seems that the restriction is too ... limiting ! wink


So, in order to progress, here is the solution that I choosed :

  • Import tests first
  • Then import steps
  • Import testsets
  • Using the XRay API Rest to import Testsets and tests links.

I've tried the REST API yesterday with the xlsm file and it seems to be working.

So I keep going !

Best Regards,

V.M.

Hello Vincent,

I think i forgot the mention link1 is just what i decided to put in the cvs it can be any name you want but in the csv tool on the mapping screen you need to choose "Tests association with a Test Set" but like you said this is quite limited because you would need to have 1 column for each Test you want to associate with the test set.

 

Best Regards,

André Rodrigues


Marco Raminelli August 19, 2020

Hello Andrè,

I can't download the csv sample. It just pops up in the left corner of the screen in a small window.

Can you provide it to me?

Thanks

0 votes
Thirupathi Gangula March 20, 2024

We are currently migrating our tests from QC to Jira-XRay.

What are  the best methods available migrate data from ALM/QC to Jira Xray

Suggest an answer

Log in or Sign up to answer