Executing a Visual Test Within a Visual Test

Visual tests can call and execute other visual tests and play them back. This allows a modularized approach to application testing and provides greater control over test execution. When executing one visual test within another, it is important to remember to keep test site integrity and ensure any test applications being tested are in the correct initial playback state.

You can use also this procedure to create a driver test.

  1. Open the visual test in which you want to insert another test.
  2. Select the step after which you want to insert the test.
  3. Click Insert > Visual test. The Browse for Visual test dialog box opens.
  4. Choose whether you want to display all assets or only assets that you have created.
    Note: Click any column header (Name, Project, Description, or Modified Date) to alphabetically sort the list of visual tests by column header type.
  5. Select the visual test to insert and then click OK.
    Note: Visual tests from the current project and from all referenced projects display in the list.
    Tip: If there are many visual tests in the Select an asset list, type the name of the visual test that you want to insert into the Name Filter text field and then click on the visual test.
    Silk Test Workbench inserts a step below the selected step. The inserted step calls the selected visual test.

During playback, when the above step executes, the inserted visual test plays back to completion before the next step in the calling visual test executes. Once a visual test has been inserted into another visual test, you can configure the settings used to play it back.

During playback, the tested applications are configured, hooked, and started when required, and remain hooked until the end of the playback session. For example, if the calling visual test has an application configuration for Notepad, and the inserted visual test has an application configuration for Calculator, the following happens:
  • Notepad is hooked and started when the execution of the calling visual test starts.
  • Calculator is hooked and started when the execution of the inserted visual test starts. Notepad remains hooked.
  • Both Notepad and Calculator remain hooked when the execution of the inserted visual test stops.
  • Both Notepad and Calculator get unhooked when the playback session ends, which means that the execution of the calling visual test stops.