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.
Example of a sheet with two manual Tests
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.
How the CSV file looks like once the test cases above are exported
Importing
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:
Where,
- 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.
Next, you need to map the fields from your CSV to JIRA and Xray fields:
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.
Next, select the Xray project where you want your Manual Test cases to be imported:
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!
Read more about it in our documentation
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!
Hi.
I’d like to know when it is released.
Thank you.
Hi Adelaj,
We are at the latest QA phase of the release so, Xray’s 2.1 version should be out by the end of next week, until 24th March.
Please keep an eye on our Blog and Twitter to get all the latest news about our releases.
Cheers,
Xpand Add-ons team
Please, include trial version Xray also Test Case Importer?
I wanted to test the import csv files into JIRA v6.0.4, but Xray is not in menu: External System Import – Import external projects 🙁
Thanks.
Hi Kamila,
Thank you for your comment!
The Test Case Importer is also available in the trial version. You can read more about it here.
If you still need any assistance please open a ticket here.
Our technical team will be glad to help you.
Best regards,
Xray Team
Is there help for JSON File import!
Hi Poorna,
Importing manual steps using JSON format although possible, it is a deprecated feature because you need to produce a CSV file and then convert it to JSON and finally use Jira’s CSV importer for creating Tests.
The new and built-in Test Case Importer works directly with CSV.
If you still want to use the JSON mechanism, you can see some instructions here: https://confluence.xpand-it.com/pages/viewpage.action?pageId=21760052#ImportingandExportingTests(CSV)-ImportingManualTests
If, in the other hand, you want to work directly with CSV files and use a more powerful importer, then please check out this documentation page: https://confluence.xpand-it.com/display/XRAY/Importing+Manual+Tests+using+Test+Case+Importer
Best regards,
Xray team
Hello, thank you for the explanation on the process how to import Tests by using Test Case importer.
Let’s assume that you have already uploaded your Test cases as Tests and also assigned them to folders in Test Repository.
During testing it will turn out, that many TC’s are wrong, so they need to be changed.
You will again use the excel modification of the TC’s for easier/bulk changes for upload.
However during upload new Tests are created, i.e. the original TC is not overwritten and there is no versioning.
How is it possible with the Test Case importer function to achieve updating existing JIRA Test, rather then creating a new one?
Hi Stefan,
Xray’s Test Case Importer (a Jira Importer Plugin extension) its an importer of Manual Tests from a CSV source file. The Test Case Importer is only able to create Test issues and it was created by Xray. Some organizations already have Manual Test definitions in spreadsheets. These spreadsheets normally define all Tests to execute and within each Test, their steps. This is the main reason why Xray’s Test Case importer is a better alternative for importing Manual Tests.
Furthermore, Test Case importer only creates tests, with Jira’s native importer you can create and update tests, as well as using our REST API.
https://confluence.xpand-it.com/pages/releaseview.action?pageId=21760052
https://confluence.xpand-it.com/display/public/XRAY/REST+API
Best regards,
Xray Team
Hi,
I want to import 3000 Test Cases. I will use the CSV files to import those test cases. I want to map test cases with Test sets when I do the import. Can I do it? If yes, can you please share the process for it.
Regards,
Jay
Hi Jay,
Yes, that is possible. On the screen where the user is able to map the values he has on the CSV with the Jira/Xray Custom fields, the user has to map the Test Set key value to the Custom Field: Test Sets association with a Test.
You may find on our documentation how to use the Xray Test Case Importer, here.
Best Regards,
Xray Team
Can you import the test directly to an story or bug?
Hi Brian,
When importing a test via CSV, you can add a column to put the keys of the issues you want to link with the test.
Please see more info in our documentation here: https://confluence.xpand-it.com/display/public/XRAY/Importing+Manual+Tests+using+Test+Case+Importer
Best regards,
Team Xray
Hi:
If I import the csv with Xray’s Test Case Importer, and next time I add a few fields with this csv and want to import , there is a problem that there is no the added fields with External Field
Hi
After import the csv with the Xray’s Test Case Importer, modify this csv such as add a few fields , import this csv again, there is a problem that the added field wont’ be shown in the external fields
Hi Na,
Please reach out to us via Service Desk so we can help you resolve this! 🙂
Best regards,
Team Xray
Hi,
While I import tests to JIRA, the status of these is ‘To-Do’. Is it possible to add the statuses while importing the tests?
Reason to ask this, I was uploading the archive cases to JIRA and since the status is To-Do, these tests sits in Backlog making it look over crowded?
Thanks
Kanika
Hi Kanika,
Yes! Whenever doing the import, via Xray Test Case Importer, you can set directly in the CSV, the workflow status for that particular Test.
Furthermore, it is also possible to filter the issues presented in the backlog. For that, go to the backlog, click on the button “Board”, and choose the Configure option. Then, edit the saved filter to exclude the undesired issue type: “Edit filter Query”
Best regards,
Team Xray
while I am trying to import the test case from excel to x-ray it’s showing me the below error. please help me with how I could upload the test cases in Xray. priority I have mapped with everyone like id name and NA but still s:
{
“errors”: [
{
“elementNumber”: 0,
“errors”: {
“priority”: “Field ‘priority’ cannot be set. It is not on the appropriate screen, or unknown.”,
“customfield_12557”: “Field ‘customfield_12557’ cannot be set. It is not on the appropriate screen, or unknown.”
}
}
],
“issues”: [],
“warnings”: []
}
Hi Ganesh,
Please reach out to our support team who will be glad to help you with your question. 🙂 You can contact them here: https://jira.xpand-it.com/servicedesk/customer/portal/2
Best regards,
Team Xray