Test Case Importer for Manual Tests
Xray v2.1 is almost here and it brings some excellent news concerning importing manual tests.
Until, and including, Xray v2.0 it was possible to import Tests, either Manual or other, using JIRA’s native CSV importer plugin (JIM) available under JIRA’s administration in System => External System Import.
Although it worked just fine, since the CSV mechanism from JIRA is generic, it would require some preliminary work in order to build a CSV file with the proper layout, namely for manual Tests. The problem with manual Tests is that they may have multiple steps, and you need to include them on the “Manual Test Steps” custom field which expects a JSON structure.
So, in general, you had to:
- create a friendly CSV with your manual Test steps
- convert them to the CSV understood by JIRA’s CSV import plugin, using an external tool named “xray-converter”
- finally, import them with JIM
Now, with this new feature you can import manual Tests from a human readable CSV source file through the specific Xray Test Case Importer, which basicaly avoids the second step mentioned above and the need to use a local tool in your computer.
With the Test Case Importer you just need the CSV containing the manual test steps and your JIRA instance with Xray.
Importing Test Cases
Preparing the CSV for importing
You can easily write the manual Tests in Excel, LibreOffice or any other tool capable of exporting rows/columns to CSV.
There are 3 mandatory fields you need to specify, although you can name the fields as you wish since they are going to be mapped during the importation process.
- Test Case Identifier – this is the field used to identify which lines belong to which test case. In the example bellow, it is the ‘TCID’ column. All the rows corresponding to steps of the same Test should have the same Test Case Identifier.
- Summary – this field is mandatory since JIRA doesn’t allow to create an issue without a summary. In the example bellow, it is the ‘Test Summary’ column.
- Step – this field is going to be mapped as the ‘Step’ field of a Manual Test step. In the example bellow, it is the ‘Step’ column.
Whenever exporting to CSV, please use a proper delimiter (“;” or “,” are good candidates) and remember the encoding being used to save the data. In the following example, “;” was used as delimiter.
In order to start the importation process, you’ll need to:
- Log in with an administrator account;
- Go to Projects>Import External Projects;
- Choose the “Xray Test Case Importer” like shown in the image bellow:
Next, you need to setup the basic settings:
- CSV Delimiter field is where you provide the column delimiter used in your CSV source file.
- File Encoding field is where you provide the encoding used in your CSV source file. Make sure that you provide the right encoding.
Optionally, you can use settings saved from a previous importation.
Note that it’s mandatory to map at least three fields.
- Test Case Identifier (located under Manual Test Step fields). In this example this field is mapped with the TCID column from the CSV file.
- Summary (Located under JIRA fields) In this example this field is mapped with the Test Summary column from the CSV file.
- Step (located under Manual Test Step fields) In this example this field is mapped with the Step column from the CSV file.
You can also Map the CSV column values, in case you need it.
The fields that aren’t mapped will not be imported within the test case.
After this last step, Xray Test Case Importer will import the manual test cases to the selected project. For last, a configuration file can be saved to import other manual Test cases afterwards using the same configuration.
Xray Test Case Importer vs JIRA’s native CSV importer
The native JIRA CSV importer can still be used to import Tests, manual (with the limitations mentioned above) and non-manual Tests. It can also be used to import other issues, such as Pre-Conditions, Test Sets, Test Executions and Test Plans.
Therefore, the two mechanisms complement each other, although the recommended way for importing Manual Tests is using the Test Case Importer due to its simplicity.
In the future…
We do intend to extend the capabilities of Xray’s specific “Test Case Importer” to be able to import other types of tests, namely Cucumber Scenarios/Scenario Outlines. Stay tuned!
We hope you are able to easily migrate your existing Test cases so you can take advantage of Xray for JIRA as soon as possible!