Parameterizing tests, actions, and objects

When you use data to parameterize a test, action or test object value, you can provide the data source from a number of places:

  • Data table: an Excel spreadsheet with parameter names and values
  • Environment variable: a variable set in your test with a fixed value
  • Random number: a random number generated by UFT in the test run

The most common of these is the Data table parameter. The data table is an Excel spreadsheet, displayed in the Data pane at the bottom of the UFT window.

Note: If the Data pane is not displayed, select View > Data or click the Data button in the toolbar.

In the Data table, there are two different types of sheets:

Global data sheets

Global data sheets contain data parameters and data that is used for and available to all actions in the test. When a parameter is inserted in the global sheet, it can be used in any of the actions and the steps in the actions in the test.

The test will run the same number of iterations as there are rows in the global data sheet. Thus, for example, if there are five rows of data, the test will run five iterations.

Action sheets

For each action in your test, UFT adds an additional sheet with that action (with the same name as the action). The data parameters and data is available only to the steps in that action.

If you use multiple rows of data within an action sheet, UFT will run the action the same number of times as there are rows in the data sheet (within one test iteration).

In the course of this lesson, you will be using only data table parameters. For details on the other types of parameters, see the section on parameterization in the Unified Functional Testing User Guide.

Next steps: