How to import test cases and associations?

Mis à jour : avr. 28

Overview:


You can import test cases from Excel (.xls, .xslx or .xlsm) or .zip format files (this file contains one Excel file per test case, it is organized in a tree structure that reflects the tree structure of the test cases to be created, and it is assembled in a .zip file).

These files must have a specific format, the import template can be downloaded from the application.

With an import file in Excel format you can import simultaneously test cases, test steps, parameters, datasets and the test cases/requirements associations, with a tab per kind of data.

The zip format import file allows you to import test cases and test steps.


This article will only focus on the import in Excel format.


To import a test case file:


1. Go to the test cases workspace


2. Click on the [Import/Export] button of the tree menu

3. Click on “Import” in the drop-down menu:





4. A window “Import Excel data” will pop up, you will be able to:








Choose the import format (Excel or zip), in this example it is Excel

Download the import templates for every format

Choose the file to import by clicking on [Choose file]

Import the file or simulate a file import

5. After clicking [Import] or [Simulate] and confirming, a window summarizing the result of the import of test cases, test steps, parameters, datasets and test case / requirement associations is displayed. It is possible to download an import report with the details of the success, reserved or failed status for each line:









6. If you chose the “Import” option, test case, test steps, parameters, datasets and test cases/requirements associations are inserted in the database, and test cases will be displayed in the tree of the requirements workspace.


Here are some rules to follow when creating an Excel file:

- The Excel file must have a table including columns as described hereafter in the table.

- The first lines in each tab (table headers), indicate the nature of the field supplied with the values of the column. The columns can be in whatever order.

- The import is made row by row. The order does not matter.

- The names of the fields in the first line are not case sensitive.

- The empty rows are ignored.

- The cells must not be merged.


Description of the import file 'TEST_CASES' tab:


ACTION (Mandatory) > Determines the action to realize. It must include the following values (or letters): >> CREATE (C): when creating a test case >> UPDATE (U): when updating a test case

TC_PATH (Mandatory)

> Test case path, from the project name to the test case name

ex: /Project name/Folder name/Test case name.

Caution: there must be no space before or after the "/" separator. If you want to put "/" in the folder or test case names, they must be neutralized by a backslash just before: "\/"


TC_NUM

> Test case order in its folder

TC_REFERENCE

> Test case reference

TC_NAME

> Test case name


TC_MILESTONE

> Name of the milestone(s) bound to the test case


TC_WEIGHT_AUTO

> Complete with 1 if weight calculation is automatic, regarding the attached requirements weight

> Complete with 0 if weight calculation is manual


TC_WEIGHT

> Test case importance code: VERY_HIGH, HIGH, MEDIUM, LOW


TC_NATURE

> Test case nature code: ATDD, BUSINESS_TESTING, NON_FUNCTIONAL_TESTING, PERFORMANCE_TESTING, SECURITY_TESTING, UNDEFINED, USER_TESTING


TC_TYPE

> Test case type code: COMPLIANCE_TESTING, CORRECTION_TESTING, END_TO_END_TESTING, EVOLUTION_TESTING, PARTNER_TESTING, REGRESSION_TESTING, UNDEFINED


TC_STATUS

> Test case status code: APPROVED, OBSOLETE, TO_BE_UPDATED, UNDER_REVIEW, WORK_IN_PROGRESS


TC_DESCRIPTION

> Test case description


TC_PRE_REQUISITE

> Test case prerequisite


TC_CREATED_ON

> Test case creation date


TC_CREATED_BY

> Creator login


TC_LAST_MODIFIED_ON

> Test case last modification date


TC_LAST_MODIFIED_BY

> Login of the user who last modified the test case


TC_CUF_<cuf code>

> In the column heading, enter the code of the custom fields associated with the test case, preceded by TC_CUF_.

> In the column, set the value of the custom field.



Description of the ‘STEPS’ tab of the import file:


ACTION (Mandatory) > Determines the action to realize. It must include the following values (or letters): >> CREATE (C): when creating a test step >> UPDATE (U): when updating a test step

TC_OWNER_PATH (Mandatory)

> Path towards the test case owner of the test step. Caution: there must be no space before or after the "/" separator. If you want to put "/" in the folder or test case names, they must be neutralized by a backslash just before: "\/"

TC_STEP_NUM

> Order of steps (by numbers)


TC_STEP_IS_CALL_STEP 

> Complete with 0 if step is a step action > Complete with 1 if step is a call step  


TC_STEP_CALL_DATASET 

In case of a call of a pre-existing test case:

> INHERIT: if the chosen option is not to choose datasets. The calling test case will inherit the parameters of the called test case

> if not, you must set the chosen dataset


TC_STEP_ACTION 

> Step action

> Or CALL/Project/path towards the called test case if it is a test case call


TC_STEP_EXPECTED_RESULT 

> Expected result for the step  


TC_STEP_CUF_<cuf’s code>

> In the column heading, enter the code of the custom field associated with the test case, preceded by TC_STEP_CUF_.

> In the column, set the value of the custom field.



Description of the ‘PARAMETERS’ tab of the import file:


ACTION (Mandatory) > Determines the action to realize. It must include the following values (or letters): >> CREATE (C): when creating a parameter >> UPDATE (U): when updating a parameter

TC_OWNER_PATH (Mandatory)

> Path towards the test case owner of the dataset. Caution: there must be no space before or after the "/" separator. If you want to put "/" in the folder or test case names, they must be neutralized by a backslash just before: "\/"

TC_PARAM_NAME

> Parameter name


TC_PARAM_DESCRIPTION

> Parameter description



Description of the ‘DATASETS’ tab of the import file:


ACTION (Mandatory) > Determines the action to realize. It must include the following values (or letters): >> CREATE (C): when creating a dataset >> UPDATE (U): when updating a dataset

TC_OWNER_PATH (Mandatory)

> Path towards the test case owner of the dataset. Caution: there must be no space before or after the "/" separator. If you want to put "/" in the folder or test case names, they must be neutralized by a backslash just before: "\/"

TC_DATASET_NAME (Mandatory)

> Dataset name


TC_PARAM_OWNER_PATH

> Path towards the test case owner of the parameter. Caution: there must be no space before or after the "/" separator. If you want to put "/" in the folder or test case names, they must be neutralized by a backslash just before: "\/"

> This column is necessary in case of parameters coming from test cases called by the test case owner of the dataset.


TC_DATASET_PARAM_NAME (Mandatory)

> Parameter name for which the value will be filled


TC_DATASET_PARAM_VALUE

> Corresponding value for the specified pair {dataset | parameter}



Description of the ‘LINK_REQ_TC’ tab of the import file:


REQ_PATH (Mandatory)

> Requirement path from the project name to the requirement name. Caution: there must be no space before or after the "/" separator. If you want to put "/" in the folder or test case names, they must be neutralized by a backslash just before: "\/"

REQ_VERSION_NUM (Mandatory)

> Number of the requirement version to link

TC_PATH (Mandatory)

> Test case path from the Project name to the test case name. Caution: there must be no space before or after the "/" separator. If you want to put "/" in the folder or test case names, they must be neutralized by a backslash just before: "\/"

En renseignant votre adresse mail, vous acceptez de recevoir notre newsletter mensuelle. En savoir plus sur notre politique de protection des données à caractère personnel.

Je souhaite recevoir les dernières actualités Squash :

  • Facebook
  • Twitter
  • YouTube
  • Noir LinkedIn Icône

Contact 

1, rue François Ory, 92120 MONTROUGE | +33 1 42 31 02 00

contact@squashtest.com