Mapping ActiveData to Literal Data

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.

  1. Select the first step in the visual test that enters data into a field. This should be the step that enters 'Pat' into the First Name text box on the Create a New Account page of the InsuranceCo Web site, as originally recorded in the visual test. Properties for the step appear in the Properties pane.
  2. In the Properties pane, in the Parameters category, select the text parameter, which indicates the text that was set to Pat.
  3. Click Select in the value area and click ActiveData.
    Tip: If customers is not in the ActiveData asset list, it has not been associated with the visual test.
    The Select an ActiveData Column dialog box opens. Use this dialog box to map the data from the selected property in the test step to data from a column in the ActiveData file.

    The ActiveData asset text box shows the ActiveData asset customers, which was associated with the visual test. The column names from the customers ActiveData file display in the Columns list.

  4. In the Columns list, select the First Name column. This is the column in the file that contains first names, which you are mapping to substitute for the literal data 'Pat'.
  5. Click OK to close the dialog box and map the data. Silk Test Workbench replaces the actual data in the test step with an expression that maps to the selected data in the ActiveData file. The existing step text Enter 'Pat' now shows the name of the ActiveData asset, the type of data being substituted, and the column name:
    Enter '[[customers].Text("First Name")]'
  6. Repeat steps 1 through 5 for all other test steps containing data to be substituted with data in an ActiveData file associated with the visual test. Start with the next step, which is the step containing the step text Enter 'Smith' text.

    The following table shows:

    • The text of each step in this visual test whose literal date is to be substituted with data from the ActiveData file
    • The name of the step property whose data is to be substituted
    • The ActiveData column to select that contains the data that will be used in place of the literal data
    Note: Steps updated using ActiveData that enter text into a password protected text box do not show ActiveData information in the step text.
    Step Text Property ActiveData Column
    Enter 'Smith' Text Last Name
    Enter 'smith@test.com' Text Email Address
    Enter '1212 Test Way' Text Mailing Address
    Enter 'San Diego' Text City
    Select list box item 'California' List Box Item State
    Enter '92121' Text Postal Code
    Enter 'test' Text Password

Now that this visual test has been set up to use data from an ActiveData file, play it back and review the results.