Import a CSV or JSON file into a Test Case’s Test Data Collection to reuse variable values. Select the destination Test Case version before importing.
Before you begin
You need access to the Jira space and permission to edit the Test Case.
Check the destination version and its existing variables. You can export the collection before importing.
Creating additional collection iterations requires Vansah Advanced. With Standard, import into iterations that already exist.
Prepare a CSV file
Put variable names in the first row. Each following row is one set of iteration values.
USERNAME,ROLE
[email protected],Administrator
[email protected],Viewer
This example contains two variables, USERNAME and ROLE, and values for Iterations 1 and 2. Do not add a separate iteration-number column; every column is treated as a variable.
CSV imports create new variables without the sensitive flag. Mark any sensitive variables appropriately after importing, or use JSON to include the flag for new variables.
Prepare a JSON file
You can import a JSON export from Vansah or use a variable array like the example below. JSON supports sensitivity flags, variable order, and descriptions for iteration values.
[
{
"name": "API_TOKEN_SAMPLE",
"isSensitive": true,
"positionNumber": 1,
"iterations": [
{
"value": "sample-token-one",
"description": "Test account for the first data set"
},
{
"value": "sample-token-two",
"description": "Test account for the second data set"
}
]
}
]
Replace the sample names and values with your test data. Every variable in the file must have the same number of iterations.
If an exported JSON file contains a collection identifier, it must match the destination collection. A simple variable array like the example above does not require a collection identifier.
Import limits
Item | Limit or requirement |
Variables | Up to 20 in the destination collection version, including existing variables. |
Iteration values | Up to 1,000 iterations per variable in one import. |
File size | Up to 100 MB. Supported file types are CSV and JSON. |
Variable names | Use unique names, such as |
Values and descriptions | Each iteration value and description can contain up to 255 characters. |
Import the file
Open Vansah in your Jira space and open the destination Test Case.
Select the intended Test Case version.
Select the Test Data Collection button in the toolbar.
Open ⋯ (More Options) and select Import.
Choose or drop your CSV or JSON file into the upload area.
Review Columns Validation, including the variable names and any errors.
Select Next to continue to the import result.
Review the imported and skipped items, then select Close.
Check the collection’s iteration values to confirm the data you expected was added.
The walkthrough below shows a JSON file being imported into an empty Test Case collection.
How existing data is handled
File rows or JSON iteration entries are numbered from Iteration 1. Importing does not start at the iteration currently displayed in the collection.
Situation | What happens |
A variable is new | Vansah adds the variable and its imported iteration values. Values for other existing iterations are left blank. |
A variable already has a value for an imported iteration | That variable’s existing iteration entry is skipped. Its saved value is not overwritten, even if you changed it in the file. |
The file contains additional iterations | Vansah Advanced can create the missing iterations. Other variables not included in the file have blank values in those new iterations. |
Some values conflict and others are new | The import can add new data and report conflicting entries as skipped. Check the result details. |
To change an existing saved value, edit it in the Test Data Collection. Reimporting a file with an edited value does not replace that entry.
Note: Masked values such as ****** in an export are placeholders. An import does not recover the original sensitive values from them.
Troubleshooting
Problem | What to check |
No variables were imported | Read the result details. The incoming variable and iteration combinations may already exist. |
The import would exceed 20 variables | Count both existing variables and new names in the file. Reduce the new variables before retrying. |
A message says new iterations require Advanced | Use only existing iterations with Standard, or use Vansah Advanced to add iterations. |
Variables have different iteration counts | Give each JSON variable the same number of iteration entries. CSV should use one consistent set of columns. |
The collection identifier does not match | Use a file exported from the destination collection, or prepare a variable array without a source collection identifier. |
Validation reports an invalid name or value | Use unique variable names without spaces and keep names, values, and descriptions within their limits. |
