Import and export subsets

The Tricentis Tosca subset interface allows you transfer data from one project to another. For example, you might want to copy data of a single-user project to a multi-user project, or export specific parts of a project into another project.

In Tosca, you can easily import and export subsets that contain individual objects or an entire project including large subsets.

Use large subsets

The import and export of large subsets can cause high memory consumption which might lead to exceptions or even failure. As a general estimate, a large subset starts at more than 50 MB depending on how much free memory you have.

Tricentis Tosca provides a setting that allows you to avoid issues during the import and export of large subsets by making the process more responsive and less memory consuming. If you enable this setting, Tosca also automatically saves your workspace. However, the import/export of large subsets can still affect performance.

Tricentis recommends compacting your workspace, if you want to import/export large subsets. To do so, navigate to Project->Info and select Compact Workspace.

To enable the setting for import/export of large subsets, follow the steps below:

  1. Go to Project->Settings->Commander->General->Advanced.

  2. Set the value of UseLargeSubsetExport and/or UseLargeSubsetImport to True.

Export subset

You can export all Tricentis Tosca objects as a subset. The subset can contain individual objects or an entire project.

Export individual objects

If you export individual objects, Tosca automatically exports all objects that are required to recreate the selected object in another project. For example, if you export a TestCase all referenced Modules are also exported into the subset. If you export an ExecutionList, all referenced TestCases and their Modules are exported into the subset.

Excluded objects

Tricentis Tosca doesn't export test configuration parameters or project definitions that you create for the project root element.

Additionally, Tosca doesn't export traceability information stored in the following default properties:

  • CreatedAt

  • CreatedBy

  • ModifiedAt

  • ModifiedBy

Export subset

To export a subset, follow the steps below:

  1. Right-click on an object and select Export Subset from the context menu.

    If you want to export the entire project, select the project root element.

  1. In the subsequent dialog, specify where you want to store the subset.

Export Subset dialog

  1. Click Save to start the export. This may take a few minutes.

Import subset

You can import .tsu or .tce subset files into Tricentis Tosca.

Prerequisites

In a multi-user workspace, checkout the object from which you want to start the import as described in chapter "Checkin and checkout objects".

Properties of imported subsets

When you import a subset, the values of the properties CreatedAt (time and date of the subset import) and CreatedBy (your user name) are automatically created. The attributes ModifiedAt and ModifiedBy are created with the value Unknown. When you save the imported subset, Tosca automatically adds values for the properties ModifiedAt and ModifiedBy.

Merged objects

If you import a .tsu subset file that contains XModules and XModuleAttributes, Tosca merges them. This allows you to maintain existing Modules in multiple projects and to easily apply changes from one project, version, or branch to any other.

By default, Tosca is set to merge objects when you import a subset. To disable merging, follow the steps below:

  1. Go to Project->Settings->Commander->General->Advanced.

  2. Set the value of UseMergeSubset to False.

Tricentis Tosca can only merge subsets from a branch to the master. If you import a subset into a branch workspace, it duplicates already existing XModules or XModuleAttributes instead of merging them.

Import subset

To import a subset, follow the steps below:

  1. Right-click either on the project root element or on a ComponentFolder and select Import Subset from the context menu.

Alternatively, use Home->Import Subset. The import starts from the level of the selected object.

  1. In the subsequent dialog, select the .tsu or .tce subset file that you want to import.

  2. Click Open. This may take a few minutes.

Open the selected subset file

  1. If you import a .tsu subset file, select whether you want to Merge or Import in the subsequent dialog.

    If you select Merge, Tosca imports the subset and merges as follows:

    • The UniqueId of the merged objects stays the same.

    • XModules and XModuleAttributes in the source and target project are merged.

    • Parameters in the source and target project are merged.

    • Parameters in the source project are added.

    • Parameters in the target project are not deleted.

    If you select Import, Tosca imports the subset and imported objects get a new UniqueID.

Tosca imports the objects (TestCases, Modules, or ExecutionLists) in newly created folders. If you perform the import on a ComponentFolder, Tosca creates the new folders there.

Import subset result

Example: Merge subset

In the example below, you merge a subset that contains XModules and XModuleAttributes.

Project 1 contains the XModule Enter Vehicle Data that is linked to XModuleAttributes A, B, and C.

Project 1: merge subset

Project 2 contains the XModule Enter Vehicle Data that is linked to XModuleAttributes A, B, and D.

Project 2: merge subset

You merge the project root element of project 1 and import the subset in project 2. This results in the following changes:

  • The XModules Enter Vehicle Data, Vehicle Data, and Enter Insurant Data are merged.

  • The XModulesAttributes A, B, and C are merged.

  • The XModuleAttribute D from project 2 is copied and added to the XModule Enter Vehicle Data.

  • The same logic applies for parameters.

Merge subset result

Solve possible issues

If you export and then import an object, the previously assigned access rights are not copied over. You have to assign them again.

When you merge and import a subset in multiple workspaces, you can't perform Checkin all or Update all on objects with the same UniqueId. To resolve a UniqueId conflict, click Show objects in the error message that appears and delete duplicate objects.