Adding Parameters to a Visual Test

Visual tests can receive data from a script or another visual test as an input parameter and can pass data to another visual test as an output parameter. Parameters are defined in the <<Start>> step of a visual test, edited in the Properties window, and are available to the visual test during playback. Once parameters are created, they are available to the visual test in which they are created.

  1. Open the visual test for which you want to create parameters.
  2. Click the <<Start>> step in the Task pane.
  3. In the Properties pane, navigate to the Variables category.
  4. Select the parameter type that you want to create:
    • To create a new input parameter, click the Input parameters field.
    • To create a new output parameter, click the Output parameters field.
  5. Click Add Parameter.
    The Add Parameter dialog box opens.
  6. Type a name for the parameter into the Name field.
    Valid characters for parameter names include uppercase and lowercase alphanumeric characters and the underscore ("ABC", "abc", "_"). If a parameter name being added or edited is a duplicate of another parameter name, supply a unique name for the parameter.
  7. Select a data type for the parameter from the Type list.
    Silk Test Workbench supports the following parameter types:

    The parameter's value is either True or False.

    Number (Double)

    The parameter's value is a double-precision floating-point number, and is stored as a 64-bit number in the range -1.7E308 to +1.7E-307.

    Number (Long)

    The parameter's value is a number ranging from -2,147,483,648 to 2,147,483,647. Periods (for a fractional/decimal value) cannot be used.

    Number (Long Long)

    A 64-bit integer value that can have a value in the range -9223372036854775808 to 9223372036854775807.


    The parameter's value is a text string. Text type values can contain letters, numbers, spaces, and punctuation.


    This parameter groups together a set of values and orders them sequentially from 1 to n. Use this parameter type with properties or parameters that expect an enumeration data type.

    An enumeration stores the numeric value in a 64-bit integer in the range -9223372036854775808 to 9223372036854775807. However, the engine only supports 32-bit enumerations, while the UI supports 64-bit enumerations (in future releases, the engine will support 64-bit enumerations).

  8. In the Initial Value field, type the value for the parameter to be passed. If left empty, the initial value of the parameter as set in the visual test is used. The value must be consistent with the type. For example, if the type is Number (Long), the initial value must be an integer.
  9. Click OK. The name and initial value (if any) of the parameter display under the selected parameter type in the Properties pane for the <<Start>> step.
  10. Repeat the preceding step to create other parameters as needed. The fields for the parameter types indicate the number of parameters of the type that are currently defined. For example, if the field for the Number(Long) item is 3 Items, there are three parameters currently defined for the visual test that are of the Long data type.
Note: Parameters are not assigned a value when they are created. The parameters can only be assigned a value when the test is executed in another visual test. When playing back a visual test in which the parameters are created, values must be assigned when playing back the visual test that creates the parameters. In this scenario, the Parameters dialog box opens when playback starts, allowing values to be assigned to the parameters.