Import test cases [PLUS]
This feature is available in QAlity Plus - Test Management for Jira exclusively.
Looking to migrate from other test management tools?
Check out Migrating from test management tools to QAlity
General information
You can import test cases to your Jira instance using a CSV file. It’s a 3-step process where you set things like the delimiter of your CSV file or which CSV field should correspond to which Jira issue field.
This feature is available only with QAlity Plus.
To import test cases, open the QAlity Plus menu and click Import.
Cloud:
Server:
First Step - Choose the file and configuration
In the first step:
You select to which project you will be importing the test cases. Please make sure it contains the QAlity test issue type otherwise you will encounter a warning telling you to do this before proceeding to the next step. You can also download the CSV template file to view how the correct import file should look like and also possibly base your own CSV file on it.
You import a CSV file. Please make sure that it’s not bigger than 10MB and its extension is “.csv”.
By default, we will use UTF-8 encoding to read the file. In the case of languages using different characters, it could be required to change this value. In case of a wrong value provided, we will backup to UTF-8.
The delimiter separating the value in your CSV file. By default, we choose a comma “,“. If it uses a different one such as “;” (semicolon), Tab key, “|” (pipe) or Space key, it should be automatically detected.
Second Step - Mapping
In the second step, you have to map which column from your CSV file will be used for the Test case name, Test Step, Expected result, and other required fields in your Jira which could be present. Optional fields such as Labels, Reporter, Component and others are supported and they can be also selected in this step (list of all supported field types is located below in this article).
The importer uses the ‘Test case name’ to both distinguish between one test case and another and to use it as a name for a newly created Test case. For this reason, please make sure that you use unique test names in your CSV file.
Each CSV column can be mapped only once to one field.
You have to select all the required fields otherwise you will be unable to proceed further.
In case of having required fields that we do not support, you will have to temporarily make this field optional before importing.
Fields that have a default value in a project, e.g. Creator or Reporter, are not mandatory.
Please note that CSV files that have both filled and empty non-mandatory fields will also be accepted by the import feature, as the default value (e.g. User who performs the import in case of Creator or Reporter) will be used for empty fields.
Supported field types
Number fields e.g. 1, 2, 1000
Text Fields e.g. “Lorem ipsum”
User fields e.g. User_Id
Fix version e.g. v1, v2
Component
Select list (single and multi choice)
Assignee
Reporter
Labels
Currently unsupported field types
Due date
Attachments
Multiple user select
Third step - Import summary
The third step conducts the importing with a summary that will show up after the import is completed. Please do not close your browser while the import is in progress!
In the summary screen, you can:
See how many test cases were created successfully.
See how many encountered an error (e.g. missing value for a required field).
See a list of the errors.
See created test cases (by clicking a See the list link).
Download error logs (by clicking Download logs).
Import more test cases by clicking a button Import more which will take you back to the first step. Already imported test cases will NOT disappear.
Exit importing. This will take you to the test cases overview screen.
Additional information on CSV importing
Below you will find additional aspects of the CSV importing feature that may be useful in specific use cases:
Test case name placement and custom fields values
Test case name must be added to each row within the CSV file, as in the example below, to avoid errors:
In terms of custom fields, their value should be placed only in one cell within the CSV file. Otherwise, only the last value will be imported:
Adding fields with new values to Jira through import
In terms of Labels and Components, adding new values in the CSV file will create such new Labels for the imported test cases in the Jira instance, however in case of other fields with defined values (e.g. with a Select list), if the value is not in Jira, the import will fail.
How to Assign Jira Users via Account ID in CSV Imports?
Within the CSV file, the fields which are representing a specific Jira user (e.g. Creator or Reporter) must be filled with the Account ID, as typing in just the name of the user will unfortunately will not assign this field to a specific user within the Jira instance.
Account ID is a string value which represents the user within your Jira instance. By adding such value to your CSV file, you will be able to assign the imported test case to the selected Jira user.
How to get the Account ID of a specific user? There are two methods to achieve this:
By taking it from the URL of the user’s profile within your Jira instance:
Jira Cloud – from your Jira main page go to Teams → Search people and teams. From there you can select or search your team for specific users. Finally, by clicking on the specific user, you can then take a look at the URL of their user’s profile and copy only the string after the “people/” fragment of the link, this is the Account ID:
Jira Data Center – the Account ID is substituted here with the username field which can be located by going to the Settings ( cog icon in the upper right corner) → User management.
The username should be then located over the user’s email address in the 'Username' column:
By exporting it through the Rest API:
Using the JIRA Issue (Work item) API Endpoint
1. Find an issue (work item) the desired user is associated with.
2. Open the issue using the URL format below:
https://<instanceName>.atlassian.net/rest/api/2/issue/<issue-key>?expand=names
e.g. https://myinstance.atlassian.net/rest/api/2/issue/SD-123?expand=names
Search for the field this user is associated with. (e.g., Assignee, Reporter, Request Participants, etc.)
Its structure will be similar to the JSON below:
"reporter": {
"self": "https://myinstance.atlassian.net/rest/api/2/user?accountId=qm:5fa6aad4-3a95-44f9-b50d-a465c5d85172:225adc9a-ce45-45a4-92de-3c2d8b6b687f",
"accountId": "qm:5fa6aad4-3a95-44f9-b50d-a465c5d85172:225adc9a-ce45-45a4-92de-3c2d8b6b687f",
"avatarUrls": {
"48x48": "...",
"24x24": "...",
"16x16": "...",
"32x32": "..."
},
"displayName": "User name",
"active": true,
"timeZone": "...",
"accountType": "atlassian"
},
b. Using the JIRA User Search API Endpoint
Open the endpoint below in a new tab and change the information accordingly:
https://<instancename>.atlassian.net/rest/api/3/user/search?query=<emailAddress>
e.g. https://myinstance.atlassian.net/rest/api/3/user/search?query=customer@company.net
Its structure will be similar to the JSON below:
[
{
"self": "https://myinstance.atlassian.net/rest/api/3/user?accountId=qm:5fa6aad4-3a95-44f9-b50d-a465c5d85172:225adc9a-ce45-45a4-92de-3c2d8b6b687f",
"accountId": "qm:5fa6aad4-3a95-44f9-b50d-a465c5d85172:225adc9a-ce45-45a4-92de-3c2d8b6b687f",
"accountType": "atlassian",
"emailAddress": "user@company.net",
"avatarUrls": {...},
"displayName": "user",
"active": true,
"timeZone": "...",
"locale": "en_US"
}
]
More information on these endpoints can be found here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search#api-rest-api-3-user-search-get