Data table parameters

Relevant for: GUI tests and scripted GUI components

Data table parameters enable you to supply a set of possible parameter values for a data-driven test, component, or action.

Data-driving instructs UFT to run a test, component, or action several times using the data supplied by the table in the Data pane. Each test or action iteration uses the next row of values in the table as the parameter values.

Data table parameter usage

Create a new data table parameter to add a new column to the end of the Data pane.

Any current value you've given to the parameter is entered into the first row of that column. If you parameterize a value using an existing parameter that already has values in the Data pane, those values are not overwritten.

The Data pane supports the following types of data table parameters:

Global data table parameters

Used in multiple actions across the test.

Having multiple rows in your Global data table sheet means that your entire test will run multiple times, once for each row.

For details, see Global data table parameters.

Local data table parameters

Used in a single action only.

Having multiple rows in a local data sheet means that the corresponding action will run multiple times before continuing on to the next action in the test.

For details, see Local data table parameters

Having multiple rows in both the Global and local data sheets means that each single test iteration runs multiple action iterations before continuing on to the next test iteration.

Tip: Use global data table parameters when you want the data to be available to multiple actions, and when you want subsequent iterations to use different data for a particular parameter.

Global data table parameters

Global data table parameters take data from the Global sheet in the Data pane, and can be used in any action.

By default, the test runs an iteration for each row in the sheet, however other options include:

  • Setting your test to run only a single iteration with a selected row of data
  • Setting your test to run iterations using specified rows of data only

Tip: Use global data table parameters to pass values from one action to another.

To do this, output values to the global sheet in the Data pane from the first action and then use them as input parameters in another action. For details, see Output Values in GUI Testing.

Back to top

Local data table parameters

Local data table parameters take data from the action's sheet in the Data pane and apply only to that action.

By default, actions run only one iteration. To data drive your actions, configure specific calls to the action to run iterations for all rows in the sheet, or for specific rows only. Configure your action calls in the Run Tab of the Action Call Properties dialog box.

For details, see Run Tab (Action Call Properties Dialog Box).

Back to top

Data table parameter samples

The following sample scenarios illustrate how you might use data table parameters in your test.

Searching a membership database

Suppose your application includes a feature that enables users to search for contact information from a membership database.

When the user enters a member's name, the member's contact information is displayed, together with a button labelled View <MemName>'s Picture, where <MemName> is the name of the member. Parameterize the name property of the button using a list of values so that during each iteration of the run session, UFT can identify the different picture buttons.

Flight itineraries

Consider the Mercury Tours sample Web site, which enables you to book flight requests. To book a flight, you supply the flight itinerary and click the Continue button. The site returns the available flights for the requested itinerary.

Although you could conduct the test by accessing the Web site and submitting numerous queries, this is a slow, laborious, and inefficient solution. By using data table parameters, you can run the test for multiple queries in succession.

When you parameterize your test, you first create steps that access the Web site and check for the available flights for one requested itinerary.

You then substitute the existing itinerary with a data table parameter and add your own sets of data to the relevant sheet of the Data pane, one for each itinerary.

In this example, UFT submits a separate query for each itinerary when you run the test.

Back to top

See also: