NOTICE: Our Community is moving. Get more information. Updated information on a New Login Process
When renaming or moving assets, Silk Test Workbench 19.0 offers additional options to ensure that related assets are updated to reflect new asset names or project locations.
As an example for moving and sharing projects and assets, assume that you have a test suite with the four test projects Accounts , General Ledger, Human Resources, and Reports, and the two utility projects Database and Utils.
The projects Accounts and General Ledger reference the projects Database and Utils.
The projects Human Resources and Reports reference the project Utils.
The projects Database and Utils do not reference any other projects.
You can follow along with the samples in this post by downloading the attached ZIP file (containing the database), which includes all the projects and files mentioned here including all the project references. Create a DSN for the database and add it as a recognized database using the Database Connection Configuration program.
In this example we are going to move a script from one project to another and Silk Test Workbench will update any references to that script.
Figure 1 shows the main Silk Test Workbench window with the Project References and Include Info panes open. To show these windows, click View -> Project References and View -> Includes.
Figure 1: Workbench window with Project References and Include Info docking windows shown.
When a script is selected, in this case Employee Onboarding, the Project References window shows the project that the script resides in, in this case Human Resources, and the list of projects that it references. As you can see in Figure 2, Human Resources references Utils and the global project Common.
Figure 2: The projects that are referenced by Human Resources.
The Include Info window shows the assets that the selected asset uses. In Figure 3 you can see that Employee Onboarding uses three Visual tests, which are all residing in the Utils project.
Figure 3: The tests that are used by the Employee Onboarding test.
We want to move the Cleanup test to the Database project because the test deals exclusively with database functionality.
Before we move Cleanup, let us find out what Visual tests use it. To find the Visual tests, Select Cleanup in the Asset Browser and click on the Included by tab in the Include Info window.
Figure 4: The tests that include the Cleanup test.
We can see that the Visual test is used by five assets across three projects.
To move the asset to another project, right-click on the asset name and select Rename. Alternatively, you can press F2.
Figure 5: Opening the Rename Asset dialog.
In the Rename Asset dialog you can rename the asset or move it to another project.
For example, to move the asset to the Database project, select the target project from the Project list and click OK.
Figure 6: The Rename Asset dialog.
The Renaming dialog appears. This dialog shows the assets that will be affected by this change.
Figure 7: The Renaming dialog.
This dialog reflects the information in the Include Info pane. This allows you to see the impact of the change. In this case, the assets in the projects Human Resources and Reports will be adversely affected, because they currently reference the Cleanup asset in the Utils project. If Cleanup is moved to the Database project, the referencing projects will lose access to the asset because they do not reference the Database project.
Tip: You can hover the mouse cursor over the red tick to see an explanation of the error.
For our example, we will perform the rename and move anyway.
There are two options available in the Rename dialog:
For our example, click Rename this asset and update references. Only the asset End of Month Processing in the General Ledger project is updated, as General Ledger is the only project that references the new target project Database.
The Visual test Cleanup is moved to the Database project and can be seen in the Asset Browser.
Figure 8: The Cleanup test in the Asset Browser after the move.
Selecting Cleanup updates the Include by tab of the Include Info window. This tab now only shows the Visual test End of Month Processing using the Cleanup test. The other assets do not reference this asset anymore because the containing projects do not reference the Database project.
Figure 9: Only End of Month Processing continues to use Cleanup after the move.
The next example illustrates what happens when a user renames an asset while not having write access to assets in a referencing project.
Figure 10: The user Tester has Read Only access to the project Human Resources.
For this example we will rename the asset Login to SystemLogin while leaving it in the same project. In the Included by tab of the Include Info window, we can see that Login is referenced by many assets, of which three are located in the Human Resources project.
Figure 11: Assets that use Login.
To rename Login, right-click on the asset, select Rename, change the name to SystemLogin, and click OK.
Figure 12: The Rename Asset dialog for Login.
The Rename dialog shows that all the assets are OK to be updated.
Select Rename this asset and update references.
Figure 13: Assets affected by renaming Login.
The rename and update references processing will start. In this case, the Errors Updating Asset References dialog appears, indicating that the assets in the project Human Resources could not be updated.
Figure 14: Errors while updating references due to missing write permissions.
The assets that are listed in the Errors Updating Asset References dialog were not updated and need to be manually edited.
Note: In this case, the user Tester is not able to update these assets because the user has Read Only access to the project in which the assets reside. Press Close to dismiss the dialog.
Renaming assets and moving assets between projects enables you to efficiently organize assets for reuse. By using the new workflows in Silk Test Workbench, you can easily ensure that any referencing assets are also updated for test consistency.