Import and export subsets

Tricentis Tosca provides the subset interface to transfer data from one project to another. For instance, you can copy data of single-user projects to multi-user projects. In addition, you can export specific parts of a project into another project.

If you have a large subset that you want to import or export, you can enable the import or export option for particularly large subsets.

To do so, go to Project->Settings->Commander->General->Advanced->UseLargeSubsetImport or Project->Settings->Commander->General->Advanced->UseLargeSubsetExport and set the value to True.

With this option, your workspace is automatically saved, when you import or export a large subset. Note that the import and export of large subsets might affect performance.

Tricentis recommends compacting your workspace, if you want to import or export larger subsets.

To do so, navigate to Project->Info and select Compact Workspace.

Export subset

In Tricentis Tosca you can export all objects as a subset. You are able to export either individual objects or the entire project. If you export individual objects, Tricentis Tosca automatically exports all the objects that are required to recreate the selected object in another project. If you export a TestCase, all referenced Modules are also exported into the subset. If an ExecutionList is exported, all TestCases referenced to the ExecutionList and all Modules referenced to these TestCases are exported into the subset.

Tricentis Tosca does not export test configuration parameters or project definitions that you created for the project root element.

Tricentis Tosca does not export traceability information stored in the following default properties:

  • CreatedAt

  • CreatedBy

  • ModifiedAt

  • ModifiedBy

Procedure

To export a subset, follow the steps below:

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

    If you want to export the entire project, select the project root element (see chapter "Get to know the project root element").

  1. Specify the storage location of the subset in the subsequent dialog.

Export Subset dialog

  1. Click Save to start exporting.

    The procedure may take a few minutes.

Import subset

You can either import a subset via the project window or via the menu entry Home->Import Subset.

In multi-user projects, you have to check out the object from which you want to start the import prior to importing the subset.

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.

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

Subsets can only be merged from a branch to the master. If you import a subset into a branch workspace, any already existing XModules or XModuleAttributes will not be merged but duplicated.

By default, the merge option is enabled. To disable the merge option for the Import subset task, go to Project->Settings->Commander->General->Advanced->UseMergeSubset and set the value to False.

Procedure

To import a subset, follow the steps below:

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

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

Import subset

  1. Select the required subset (.tsu or .tce file) from the subsequent dialog and click Open.

    The procedure may take a few minutes.

Select subset file

  1. If you import a .tsu subset file, choose one of the following actions you want to perform: Merge, Import, or Cancel.

    If you select Merge, the subset gets imported and merged, and the following logic applies:

    • 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, the subset is imported only and the imported objects get a new UniqueID.

When you merge and import a subset in multiple workspaces, you cannot perform Checkin all or Update all on objects with the same UniqueId.

To resolve a UniqueId conflict, click Show objects in the error message and delete duplicate objects to complete either of the actions.

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

If you export and then import an object, the previously assigned access rights are not copied over.

Import subset - result

Subset merge example

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

The first project contains the XModule Enter Vehicle Data that is linked to XModuleAttributes A, B, and C.

Merge subset - Project 1

The second project contains another XModule Enter Vehicle Data that is linked to XModuleAttributes A, B, and D.

Merge subset - Project 2

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