Clone workspaces
This topic explains how to clone a multi-user workspace, which allows you to easily replicate a specific repository's workspace as many times as you need. For example, if you want to roll out to multiple users. It's especially helpful if you have a large repository, and creating a new workspace in the Tosca user interface takes time.
A clone is not a simple copy but a snapshot of a workspace. It retains everything from the original workspace, such as folder structure, test artifacts, test artifact access rights, or synchronization settings.
![]() |
Don't copy and paste multi-user workspaces directly in the workspaces folder in Windows Explorer. Each workspace has a unique ID, and copy/pasting will break your existing workspaces. |
You have a single-user workspace? Then this topic doesn't apply to you. Cloning doesn't work for single-user workspaces—you can simply copy and paste your workspace in the workspaces folder without issue.
Before you start
Before you clone a workspace, make sure it has the latest state. To do so, check in all objects.
Clone a workspace
Tosca delivers a cloning executable file as part of the standard setup. To clone a workspace, you need to run this file via command line with the following command:
TCWorkspaceCloneUtil.exe <parameters>
Replace <parameters> with the following parameters:
Parameter |
Description |
---|---|
-w or --workspace |
Absolute path to the workspace file you want to clone. Put the path between double quotation marks: "<path>" |
Absolute path to the target directory, which is the directory in which you want to save the clone. Put the path between double quotation marks: "<path>" Note that the target directory has to be empty. |
|
-a or --auth |
This parameter is only necessary if you clone a Tricentis Server Repository workspace. For the value, enter the access credentials you created in
|
-c or --count |
This parameter is optional. For the value, enter the number of clones you want to create. If you don't use this parameter, Tosca creates one clone. |
If you get an error response during cloning, we recommend that you delete all clones and try again. That's typically faster than trying to figure out which clone causes an issue.
Examples
-
In this example, you create one clone of a workspace called WorkspaceA and save it to C:\Clones:
TCWorkspaceCloneUtil.exe -w "C:\Tosca_Projects\Tosca_Workspaces\WorkspaceA\WorkspaceA.tws" -o "C:\Clones"
-
In this example, you create fives clones of a workspace called WorkspaceB and save them to C:\MyProject\workspace_clones:
TCWorkspaceCloneUtil.exe -w "C:\Tosca_Projects\Tosca_Workspaces\WorkspaceB\WorkspaceB.tws" -o "C:\MyProject\workspace_clones" -c 5
-
In this example, you create two clones of a Tricentis Server Repository workspace called Q3_Release and save them to C:\Temp\my_clones. You use your personal access token to authenticate:
TCWorkspaceCloneUtil.exe -w "C:\Tosca_Projects\Tosca_Workspaces\Q3_Release\Q3_Release.tws" -o "C:\Temp\my_clones" -a dswJJKssl12345fdfelLJiLKM -c 2
Use a cloned workspace
You just cloned a workspace. This means that your target directory now has sub-directories, one for each clone. Each sub-directory contains all necessary workspace files.
All clones are unassigned, without a unique ID.
To use a clone, follow these steps:
-
Move the respective sub-directory to its final destination. For example, the Tosca workspaces folder on a user's machine.
-
Open the workspace clone. Tosca then assigns a unique ID to it.
What's next
The workspace clone is now ready for production. Time to start testing!