Define and manage data tables

Relevant for: GUI tests and scripted GUI components

Add an external data table file

  1. Select File > Settings to open the Test Settings dialog box.

  2. In the Settings dialog box, select the Resources node.

  3. In the Resources pane, in the Data Table section, select one of the following:

    • Default location: saved with the test in the same directory
    • External file: click the Browse button and navigate to the directory where the external data table is stored.

      Note: If you select an external file as your data table, make sure that:

      • The column names in the external data table match the parameter names in the test.

      • The sheets in the external data table match the action names in the test.

Back to top

Manually enter information

Edit information in the Data pane by typing directly into the table cells.

Back to top

Import information into the data table

Do one of the following:

  • Right-click in the Data pane and select File > Import from File from the Data pane commands.

  • Right-click in the Data pane and select Sheet > Import > From File from the Data pane commands.

Note: You can also import data saved in Microsoft Excel, tabbed text file (.txt), or ASCII format.

Back to top

Add a data table file to your ALM project

  1. Make sure you have an accessible Microsoft Excel file with an .xls or .xlsx extension.

  2. In ALM, create a new data table resource and then upload the .xls or .xlsx file you created in the previous step to the project's Test Resources module.

  3. In UFT, select File > Settings to open the Test Settings dialog box.

  4. In the Resources pane of the Test Settings dialog box, in the Data table section, select Other location and click the Browse button to locate the data table file.

  5. Enter your data as needed. When you save the test, UFT saves the data table file to the ALM project.

Back to top

Define the number of iterations for an action or test

Do one of the following:

For actions
  1. In the canvas, right-click an action and select Action Call Properties. The Action Call Properties dialog box opens.

  2. In the Run tab of the Action Call Properties dialog box, select the appropriate option:

    • Run one iteration only

    • Run on all rows - UFT runs an iteration for each row in the action's data sheet

    • Run from row <X> to row <X> - UFT runs an iteration for each of the defined rows

For tests
  1. Select File > Settings to open the Settings dialog box.

  2. In the Run pane, select the appropriate option:

    • Run one iteration only

    • Run on all rows - UFT runs an iteration for each row in the action's data sheet

    • Run from row <X> to row <X> - UFT runs an iteration for each of the defined rows

Note: If you want to prevent UFT from running an iteration on a row when the Run on all rows option is selected, you must delete the entire row from the data table.

Back to top

Change a column name

In the data pane, double-click a column header and enter the new column name in the Change Parameter Name dialog box.

Back to top

Use an autofill list

  1. In the Data pane, right-click a cell and select Data > Autofill. The Autofill Lists Dialog box opens.

  2. In the AutoFill Lists dialog box, select the type of autofill list.

  3. Enter the first item into a cell in the table (item names are case-sensitive).

  4. Fill the cells by doing one of the following:

    • Drag the cursor, from the bottom right corner of the cell up or right to fill the next row or column in the sheet.

    • Highlight the item and press ENTER to automatically fill the next row of the sheet.

    • Highlight the item and press TAB to automatically fill the next column of the sheet.

Back to top