Passing Data Between Visual Tests

Silk Test Workbench enables you to pass data between visual tests. This lets you leverage data created in your existing Silk Test Workbenchvisual test base, as well as allowing you to use the most efficient testing assets and still retain data integrity within a testing solution. Pass data between visual tests using visual test parameters.

To pass data between visual tests, one of the visual tests must be called as a test step from within the other visual test. We will refer to the calling visual test as the host test and to the called visual test as the child test. To pass data between visual tests, the visual tests must be in the same project, or the child test must be in a referenced project.

With visual test parameters, you can:
  • Create data in a visual test and use it in another visual test.
  • Create data in a visual test, pass it to a child test, modify the data in the child test, and pass it back to the host test.

The process is as follows:

  1. Add input and output parameters to the child test.
  2. Insert the child test as a test step into the host test.
  3. Pass data from the child test to the host test by editing the value of the input parameter in the host test.
    Note: The value that you send from the child test is not saved in the host test, but it can be used in computations in the host test.
  4. In the host test, create a local variable to store the data passed from the output parameter of the child test.
  5. Use the local variable within the host test.
Note: For a detailed example of how to create input and output parameters and how to use these paremeters in a visual test, refer to Playing Back Scripts From Visual Tests in the Welcome to the SilkTest Workbench Visual Test Tutorial.