Community in read only mode June 18 & 19
This community will be set in READ ONLY mode for a while on Tuesday June 18 into Wednesday June 19 while we import content and users from our Micro Focus Forums community site. MORE INFORMATION

Sharing assets in Silk Test Workbench

Micro Focus Contributor
Micro Focus Contributor
0 0 383

While Silk Test Workbench has always provided a way of sharing assets between projects, this was limited to the Common project. All projects could only reference assets in the current project and the Common project. As the number of test assets and user-created projects increases over time, sharing assets only from the Common project might become cumbersome.

Figure 1 shows how the scheme worked with previous versions of Silk Test Workbench, where all projects can only reference assets in the Common project.

Figure 1: All projects reference the Common project

Using a .Net script as an example, the following shows how a script utilizes assets in the current project and the Common project.

Public Module Main
    Dim _desktop As Desktop = Agent.Desktop
    Public Sub Main()
    End Sub
End Module

This scheme is fine for small teams and individual users but does not scale where there are many user projects with many users working on disparate parts of an application.

To solve this limitation, Silk Test 19.0 introduces the ability to define custom project references. What this means in practice is that a project can be referenced by any number of other projects.

Figure 2 shows that the project Account Management references the project Account Utilities and the project Common. It also shows that the project Account Utilities also references the project Common.


Figure 2: Multiple references

Figure 3 is similar to the previous figure with the addition of the project Account Reporting which references the project Reporting Utilities. In this example only the project Account Reporting can use assets in the Reporting Utilities project.

Figure 3: More references

Figure 4 shows a scheme where all projects can use assets in the project System Utilities.

Figure 4: Another example

These are just a few of the different schemes that could be used. Next we'll show you how to setup a project for asset sharing.

Creating projects and project references

Projects are managed using the Administration dialog. You must be an administrator to use this dialog. To open the dialog, select Tools -> Administration, then select the Projects tab.

Figure 5: Administration dialog

Figure 5 shows that there are two projects defined, Common and Project1.

We will now create the project structure shown in Figure 4.

Select the Add button. This will show the Add Project dialog.

Figure 6: Add Project dialog

Enter the name of the project that you want to create,in this case Account Management, and press the OK button.


The new project will appear in the list of projects.

Continue and add the remainder of the projects.In a later step we will add the project references.

You should end up with something like this.

To add the references, select the project Account Utilities and press the Modify button. This shows the Modify Project dialog. In the dialog, select the project System Utilities in the Available list and press the Right button to move it over to the list of Referenced projects.

You should end up with something like this.

Press the OK button to save these changes.

Now you can add the references for the other projects in the same way.

What happens if a project references more than one project?

A project can reference as many projects as required. For example, project Invoice Processing in figure 7 references the three projects Invoice Utilities, Invoice Printing, and System Utilities. Creating and assigning references is the same as before, however, you can decide which projects have preference when Workbench tries to find an asset during script execution that is not qualified with a project name.

Once the projects are in the Referenced list you can set the priority of the projects by moving them up or down the list using the Up and Down buttons.

Figure 7: Setting the order of referenced assets

The projects are searched for assets from the beginning of the list downwards. Global Projects are searched last.

As a real example, consider the following VB.Net code which attempts to execute assets but does not fully qualify some of the asset names:

Public Module Main
  Dim _desktop As Desktop = Agent.Desktop
  Public Sub Main()
    Workbench.RunScript("Invoice Utilities.LoginToUserSystem")
    Workbench.RunScript("System Utilities.Logout")
  End Sub
End Module

Where asset names fully qualified, for example Invoice Utilities.LoginToUserSystem, and Common.Shutdown, Silk Test Workbench will attempt to load the assets from the project that is specified in the name. If the asset is not found in the project, a runtime error occurs and the script will terminate with a playback error.

Where asset names are not fully qualified, which means that the names are not preceded with a project name, Silk Test Workbench searches for the asset by first looking in the current project, then searching through the project-specific references in the order defined by the containing project (see Figure 5). If the asset is still not found, Silk Test Workbench searches through the Global Projects.

This mechanism gives great flexibility in allowing referenced projects to provide assets to referencing projects and allows the projects to effectively override the functionality in a referenced project by simply creating an asset with the same name.

What happens to the Common project?

As stated earlier previous versions of Silk Test Workbench only had the Common project available as a shared project. As such, the Common project was special in that it could not be renamed or deleted and it could not be removed as a reference of any project.

These limitations have been removed and the Common project, even though it still exists, can be renamed, deleted, or removed as a reference.

Note: Since existing databases already include the Common project as the sole means of sharing assets, the Common project is designated during a database upgrade as a Global Project to ensure that existing assets replay correctly.

Global Projects

Global Projects are similar to project references except that they apply to all projects. The Common project is designated as a Global Project. The main change to previous versions of Silk Test Workbench is that any number of projects can be designated as Global Projects.

A Global Project cannot reference any other project and cannot be referenced directly as a project reference.

To define Global Projects, select the Define Global Projects button from the Projects tab on the Administration dialog (see Figure 8).

Figure 8: Define Global Projects

This shows the Define Global Projects dialog (below). This works in the same way as the dialog that is used to define project specific project references. Select projects to include as Global Projects and move them to the list on the right, then order them as required.

The list of Available projects is filtered to only include projects that do not reference other projects and that are not directly referenced by other projects.

Figure 8: Define Global Projects dialog.


The ability to control project references on a project-by-project basis and to allow projects to be referenced globally gives users much more control in organizing assets in a more structured and logical manner.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.