Mapping Data in an ActiveData File to Data in a Visual Test

Before a visual test can use data in an ActiveData file, data in the applicable test steps must be mapped to use data in columns of an ActiveData file. To do this, you first associate the ActiveData asset that contains the desired ActiveData file with the visual test. Then, each step that is to use data in an ActiveData file must be mapped to a column in the Active Data file that contains the appropriate data. Use this procedure to map data in test steps to data in an ActiveData file.

Note: When data is mapped to a data column in ActiveData file, only the first record in the column is used during playback unless repetition logic using data from an ActiveData file is created for the mapped data.
  1. In the visual test, select the first step containing data to be substituted with data in an ActiveData file associated with the visual test. Properties for the step display in the Properties pane. Properties can be sorted by category or alphabetical order. If repetition logic using data from an ActiveData file has already been created for the visual test, steps containing data to be mapped should be nested between Repeat using ActiveData and End Repeat steps.
  2. In the Properties pane for the step, click in the value area of the property that contains the data to be substituted.
  3. Click the Select button in the value area and click ActiveData. The Select an ActiveData Column dialog box opens. The ActiveData asset text box shows the ActiveData assets associated with the visual test. The name of the first asset in alphabetical order displays in the box.
  4. In the ActiveData asset text box, select the name of the ActiveData asset containing the data to be mapped. The column names from the ActiveData file for the selected ActiveData asset display in the Columns list.
    • If the ActiveData file for the selected ActiveData asset is currently open in its native application (a text editor or Microsoft Excel) column names do not display in the Columns list. If this happens, close the native application and re-select the name of the ActiveData asset containing the data to be mapped.

    • If the Use the first row as header check box is checked for the ActiveData asset, the first row of data in the data file is assumed to be column headers. The data for each column in the first row then becomes the column names that display in the Columns list.

    • If the Use the first row as header check box is not checked for the ActiveData asset, the first row of data in the data file is assumed to be data. In this case, Silk Test Workbench uses sequential alphabetic characters for the names in the Columns list ("A", "B", "C").

    Tip: When creating ActiveData files, use named headers when possible. Seeing descriptive column names in the Columns list of the Select an ActiveData Column dialog box makes it easier to map data to the correct column in the ActiveData file.
  5. In the Columns list, select the column name that contains the data to be substituted for the actual data used in the selected property.
  6. Click OK to close the Select an ActiveData Column dialog box and map the data. Silk Test Workbench replaces the actual data with an expression that maps to the selected data in the ActiveData file. The expression syntax is as follows: [[ActiveData asset name.data type]("Column name") where [ActiveData asset name.datatype] is the name of the selected ActiveData asset and the data type of the data in the selected column. For visual tests, Silk Test Workbench automatically interprets data used in ActiveData files. If the data contains only numeric characters, the data type is Long . If the data contains any alphabetic characters, the data type is Text.

    ( "Column name") is the name of the column to which the property's data is mapped.

    Tip: Values that are set by selecting a literal, variable, expression, or ActiveData can be reset if the visual test was saved when the original value was in place. Reset a value for a property by clicking the Select button in the value area and assign the original literal, variable, expression result, or ActiveData data type. The original value for the type appears as the property value.
  7. Repeat the preceding steps for all other test steps containing data to be substituted with data in an ActiveData file associated with the visual test. When data is mapped to a data column in ActiveData file, only the first record in the column is used during playback unless repetitive logic using data from an ActiveData file is created for the mapped data.
    Note: Although you can use multiple ActiveData asset in the same visual test, you can only use one ActiveData asset in a single repetition statement.