With the introduction of custom project references in Silk Test 19.0, the process of duplicating projects has changed to give the user more control in the way a project and its assets are duplicated.
Users may want to duplicate a project for a variety of reasons, for example:
- When a new version of the application under test is available for testing and the user wants to retain the assets for the previous version of the application.
- To backup a project before reworking existing test cases.
- To work independently without affecting other users of an existing project.
This post will walk you through various scenarios that can occur when duplicating a project.
The sample projects
Let's consider a scenario where there are multiple root projects which each reference other projects which in turn reference more projects, we will use the project structure in Figure 1 in the examples.
Figure 1: Example project structure.
ProjectC is referenced by ProjectB, ProjectD, and ProjectA. ProjectA also references ProjectB and ProjectD.
Duplicating a single project
Let's start slowly and just duplicate a single project, in this case ProjectE as it has no references to other projects. In Silk Test Workbench, select Tools -> Administration to open the Administration dialog and go to the Projects tab. Then select ProjectE and press the Duplicate button to open the Duplicate Project dialog.
Figure 2: Duplicating a project from the Administration dialog.
Figure 3: Duplicate Project dialog.
Let's take a look at each part of the dialog. The first thing is to provide a name for the newly created project. The New name field is populated with a suggested name derived off the existing name, in this case ProjectE (2). Change this to the name you require. The checkbox Copy all versions of assets allows you to decide whether the duplicated projects contain all the versions of the assets in the duplicated projects or just the current version.
To the right of the New name edit control is the status indicator, this will show a green tick icon indicating that everything is fine with the dialog. Hover over the icon to see a tooltip with more information.
If the indicator icon shows a red cross this indicates that there is something that needs to be resolved before the project can be duplicated. An example of this could be that the new name provided already exists.
The Referenced Projects section shows any projects that are referenced by the project being duplicated. In this case ProjectE has no references so this section is empty.
The buttons at the bottom of the Referenced Projects section are disabled, because ProjectE does not reference any projects. There is also an important note displayed here indicating that Result assets are not duplicated.
If the status indicator at the top of the dialog is a green tick, click OK to proceed. A confirmation dialog appears, where you can press Yes to proceed.
A progress dialog shows the progress of the duplication process. The time taken to duplicate the project depends on the number of assets (and versions) in the source project. Once the duplication is completed, the following dialog appears.
Press OK to proceed. The Administration dialog now shows the new project in the list.
Duplicating a project with a reference
Let's look at duplicating a project that contains a single reference. Select ProjectC and click Duplicate. Figure 4 shows the Duplicate Project dialog.
Figure 4: Duplicate Project with a single project reference.
As before, the New Name of the project is auto populated with a suggested name. The Referenced Projects section now contains the names of the projects that the source project references, in this case it is just ProjectE.
The Action column shows that when ProjectC is duplicated the reference to ProjectE will be retained. That is, ProjectC (2) will reference ProjectE and only the assets in ProjectC will be duplicated.
If the referenced project should also be duplicated, you can press Duplicate All to set the Action column to Duplicate project, or you can select the cell and use the drop-down to set the Action to Duplicate project.
When the Action column is set to Duplicate project, the New Name column will be auto-populated with a suggested name derived off the original project name, in this case ProjectE (3) (since ProjectE (2) was created in the previous example).
You can edit the New Name by clicking in the cell, pressing F2, and typing a name. The name of the project is validated to ensure that it is unique and it also follows the naming standards. If the name is invalid the Status column will show a red cross. Hover the mouse over the red cross to see a tooltip with the reason that the name is invalid. In this case the name contains the invalid characters / and ?.
Change the name back to ProjectE (3) to resolve this issue so we can proceed. Press OK to start the duplication process. In this case you will see a message indicating that 2 projects will be duplicated followed by a confirmation message indicating that 2 projects were duplicated.
What happens to referenced assets?
When a project and its referenced projects (as in the previous example) are duplicated, the duplication process takes care of updating the project names in all the assets so that the target project and all its assets will still execute successfully.
What happens to user permissions?
When a project is duplicated, the permissions of the source project are applied to the the target project. These can be changed as required.
Duplicating projects with multiple references
This final example shows the duplication of ProjectA, which references multiple child projects which in turn each reference other projects. As before, initiate the duplication process by selecting ProjectA in the Administration dialog and click Duplicate. Figure 5 shows the Duplicate Project dialog for ProjectA.
Figure 5: Duplicate Project dialog for ProjectA showing all project references.
This shows the complete hierarchy of projects that are directly and indirectly referenced by ProjectA. The same project can appear multiple times in the hierarchy, for example ProjectC and ProjectE.
If the OK button was pressed at this point a new project named ProjectA (2) would be created with project references for ProjectB, ProjectC, and ProjectD. We do not want to do this. What we want is to also make a duplicate of ProjectE. Click on the cell under the Action column (any row with ProjectE) and change the Action to Duplicate project, the Referenced Project list will look like this.
The first thing to note is that all entries for ProjectE have been updated to reflect the new name and the Action is set to Duplicate project. This is expected because the entries all refer to the same source project. They are shown in the list multiple times to give a complete picture of the project hierarchy.
The second thing is that the entries for ProjectB, ProjectC, and ProjectD all now show the status as a red cross indicating that there is a problem. Hover over the red cross to see what the problem is.
In this scenario, duplicating ProjectE but retaining the reference to the parent project is not possible. The project duplication process does not add project references to existing projects, hence this message; to resolve this problem the parent projects must also be duplicated.
You have two choices. Either change the Action for each project or click Duplicate All. Figure 6 shows the completed dialog with all the projects set to be duplicated with the new names.
Figure 6: Duplicating all projects.
Note: You could also perform a partial copy and retain references for the other projects. For example, duplicate ProjectB and ProjectD and retain references for the other projects.
In this case, the newly created projects would have the same project references as the existing projects.
To proceed with the duplication process press OK, press Yes on the confirmation dialog, and wait for the duplication process to complete.
The project duplication process makes it easy for users to take copies of entire projects by using a simple user interface that ensures that project hierarchies are maintained without adversely affecting the source projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.