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
Procedure
-
In the recording monitor toolbar, click Insert Data Driven Commands
().
The recording pauses.
-
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.
-
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
Procedure
-
In the Data Driven Commands table,
change the Variable column by replacing the Item text
with Composer.
-
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
-
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