Exporting a test case
Exporting test cases from the library
Squash TM allows you to export a tree of test cases in the .xls or .csv format. This feature is used very often to mass save or mass modify data.
If the .csv format is selected for the export, only one tab is exported. It contains the test case's attributes and steps.
Parameters, data sets, and links to requirements are not exported.
The export file's default name is "test-case-export-yyyymmdd_hhmmss", but it can be modified.
In the library, select the items (projects, folders and/or test cases) you want to export (it can be a single or a multiple selection). Then, click on the [Import/Export] button and the Export option. You can select items from multiple projects.
During the export, two options are available:
- You can also export called test cases, even if you have not selected them. To do so, check the box "Include called test cases". However, you must have an export permission on the project containing these called test cases for them to be exported.
- You can export "rich text" fields as well as their HTML tags by checking the box "Keep rich text format". To facilitate the reading of fields during the export, keep the box unchecked.
Exporting test cases with parameters and datasets
All parameters and datasets linked to test cases are exported. You can find them both respectively in the "PARAMETERS" and "DATASETS" tabs.
Exporting test cases with links to requirements
Links to requirements are exported. You can find them in the "LINK_REQ_TC" tab.
For BDD test cases, test steps are not exported.
Importing test cases from an export
Squash TM allows you to import a file that has been previously exported. This feature is useful when you want to mass modify or restore data.
To import a requirements export file, please follow these steps:
- Export the selected items (projects, folders, test cases) to .xls
- Open the exported file and add an "ACTION" column in the tabs "TEST_CASES", "STEPS", "PARAMETERS", and "DATASETS". It must be in first position in the file and contain the value:
- "C" to create a new test case / test step / parameter / dataset
- "U" to upddate an existing test case / test step / parameter / dataset
- Modify as you want. Respect the syntax for each column
- Import the new file
To import test cases to a new project or another location within the library, you must modify the "TC_PATH" column.
If the objects name contains a "/", you must escape it in the test case path (in the "TC_PATH" column) with a "\" to import them.
Project name is "Project1/app"; Test case name is "TC1/Android". "TC_PATH must be filled with: "/Project1\/App\/TC1\/Android".
To complete an import file, please visit the page: "Filling in a test cases import file"
Exporting BDD and Gherkin test cases scripts
In Squash TM, scripts of Gherkin and BDD test cases can be exported in a .zip folder:
- Gherkin test cases in .feature format, which is the format expected by Cucumber for automated executions
- BDD test cases in .feature or .robot format depending on the technology configured in the project's administration. These are the formats expected by Cucumber and Robot Framework for automated executions.
The test cases can be exported from a project, folder, or multiple select. To export the scripts of Gherkin or BDD test cases, select the option you want by clicking on [Import/Export]
The export of scripts is not kept in the Squash TM folders' tree. All Gherkin and BDD test cases are exported to the root of the .zip folder, in .feature or .robot format. They all follow the naming rule "tc_<test_id>" to avoid any name conflict or invalid file names.
In the .zip folder, there are as many files as there are selected Gherkin or BDD test cases.
In the same .zip export file, you can export BDD test cases from projects with different implementation technologies.