Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titleDeprecation Notice

This tool is deprecated and is going to be removed on future versions.

From Xray 2.1 onwards, the preferred way for way of importing Manual Tests is by using Xray's Test Case Importer, as detailed in Importing Manual Tests using Test Case Importer.

 

Some users consider For some users, it is easier to create Manual Test definitions in a spreadsheet and then import them to Xray using the import procedure described in Importing and Exporting Tests (CSV). Xray for JIRA provides a tool xray-converter to tool to make it straightforward.

This tool It converts a CSV, that basically contains the steps definitions, to into the generic JIRA's Jira CSV-compatible import format, which requires all rows to be fulfilledfilled

 


Table of Contents

Conversion overview

  1. Your step definitions must be defined in a spreadsheet that follows a specific format (see bellowtable below). So, you You can either use an example file as basis, or adapt your already existing spreadsheet;.
  2. Then, you may run xray-converter to convert the "steps " spreadsheet" to into the generic CSV format supported by JIRAJira/Xray.;
  3. Don't forget that in the end, you will have to import the tests , using the newly-created CSV file, as described in Importing and Exporting Tests (CSV).

Layout of spreadsheet with steps

Your spreadsheet must obey strictly follow this format (example file):

1           
TCIDProjectRegionIssue_TypeEnvironmentSummaryComponentDescriptionReporterPriorityLabelsTest_TypeStepDataExpected_Result
1QA Test RepositoryAMERTestTestTest Case 1App1Test Description 1Ivaan, Iftekhar: IT (NYK)TrivialJava,TestManualBrowse to urlwww.bn.comBN home page shows
1
           Clicl login  











Click login

1










Enter Useridiivaan
 

1
           











Enter Passwordxyz123OK button enable
1
 
          











Click OK
 

Welcome Msg shows
2QA Test RepositoryAMERTestTestTest Case 2App1Test Description 2Ivaan, Iftekhar: IT (NYK)TrivialJava,TestManualBrowse to urlwww.bn.comBN home page shows
2
    
       











Click OK
 

Welcome Msg shows
3QA Test RepositoryAMERTestTestTest Case 3App1,App2Test Description 3Ivaan, Iftekhar: IT (NYK)TrivialJava,TestManualBrowse to urlwww.bn.comBN home page shows
Info

The TCID must be the first column of your spreadsheet and the Step, Data and Expected_Result the last three columns. These columns are mandatory; otherwise, otherwise the conversion won't work properly.

Is also advised to It is also recommended that you always have the Issue_Type and the Test_Type columns in order to force JIRA Jira to create your tests with the correct Issue Type and Test Type.

...

Export your "steps spreadsheet" to CSV and set your separator type as ; preferably. You'll now have a file similar to the following output (example file).

...

Info

Make sure you have Java environment installed on you your machine and set JAVA_HOME. You can follow these instructions  Detailed instructions are in https://confluence.atlassian.com/display/CROWD/Setting+JAVA_HOME

...

Implementation

  1. Copy the CSV with the steps to the data/ subdirectory within the xray-converter folder.

  2. Run the xray-converter (see syntax bellowbelow).
  3. Import the issues to JIRA Jira using JIRAJira's native CSV import feature

...

  1. .


Info

In Unix based systems or OS X, you must use the xray-convert.sh executable; in Windows, you should use the xray-converter.bat batch file.

Syntax

ArgumentDescriptionExample (based on spreadsheet example)
-pathThe path to the file to convert-path ./data/SampleTestCase.csv
-dataThe test step's Data column name-data Data
-resultThe test step's Expected Result column name-result Expected_Result
-stepThe test step's Step column name-step Step
-attrDelimiterThe delimiter used in the file to separate the different attributes-attrDelimiter ";"
-testDelimiterThe delimiter used in the file to separate the different tests to import
, else
or please provide the column name. When this cell value changes, it means that the line represents a new Test.-testDelimiter TCID

Examples

Unix

Code Block
languagetext
./xray-converter.sh -path ./data/SampleTestCase1.csv  -step Step -data Data -result Expected_Result -attrDelimiter ";" -testDelimiter TCID

...

Note

When executing the xray-converter.bat file, you do not specify the argument's names, but you must respect must follow the order shown in the example.

Note

When exporting from XLS to CSV, choose the option: "CSV (comma separated)" ;.

Note

The test steps to import in the XLS , can not cannot contain the caracter character " at the end of any line; otherwise, otherwise the exported document will be unformatted;.

Warning
titleTroubleshooting

If you get an error like

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

it's because Windows is not interpreting the JAVA path as it shouldcorrectly.

Ee.g:.,

ECHO %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_45

You can fixed it with fix it by providing JAVA_HOME path with a "" e.g., "C:\Program Files\Java\jdk1.8.0_45" or more radically, copy this folder to C:\jdk1.8.0_45 and change JAVA_HOME to C:\jdk1.8.0_45

...

Installation

  1. Download xray-converter here
  2. Unzip it to a directory of your choice.

Info
titleArchive location

New version. Compatible with newlines inside cells ("\n", "\r").