Lesson 3: Perform a data-driven test

In this lesson, you insert data-driven actions into the test script and populate a dataset with the data from the sample application.

About this task

A dataset is a collection of related data records. A dataset supplies data values to the variables in a test script during test-script playback.

Procedure

  1. In the recording monitor toolbar, click Insert Data Driven Commands (Data Driven Commands).
    The recording pauses.
  2. On the Insert Data Driven Actions page, drag the Object Finder () to the title bar of the Place an Order window on the ClassicsCD application.
    The entire Place an Order window is outlined with a red border.
  3. Release the mouse button.
    On the Data Drive Actions page, the Data Driven Commands table displays the information about the selected controls.

Add descriptive headings to the data

About this task

Now add descriptive headings to the dataset that you created. Descriptive headings make it easier to add data to the dataset.

Procedure

  1. In the Data Driven Commands table, change the Variable column by replacing the Item text with Composer.

    Insert Data Driven Actions

  2. Repeat sequentially, to replace each cell in the Variable column with a descriptive name for each heading in the Variable field. Use the text in the following variables list for descriptive names.
    Note: Do not use spaces in Variable names. Typically, you review the application to determine the appropriate headings for each row, but we have done that for you in the following variables list. Use these names to replace variables in the presented order:
    • Composer
    • Item
    • Quantity
    • CardNo
    • CardType
    • ExpiryDate
    • Name
    • Street
    • CityStateZip
    • Phone
  3. Click OK.
    The dataset has descriptive headings that make it easier to add data later. In a later lesson, you add data to the dataset after you finish recording the test script.

Lesson checkpoint

About this task

You learned these tasks:
  • How to record a data-driven test script
  • How to use datasets
  • How to change the variable names in the dataset