Use data in a business process test

Relevant for: business process testing

This task provides general information for how to work with parameters, and iterations in business process tests.

Note: This task is part of a higher-level task. For details, see Create and maintain business process tests and flows in UFT.

View a slideshow on how to parameterize a business process test.

Design data

Consider the following before using parameters:

  • Determine which parameters are linked.

  • Determine which parameters should be available at the component, flow, and test levels.

  • Determine how may times each component, flow, and business process test should run, and with what parameter values.

Back to top

Create parameters and set default values

  1. In the Solution Explorer, select the test, flow, or component to which you want to add a parameter.

  2. In the Properties pane, open the Test Parameters or Parameters tab .

  3. In the Test Parameters/Parameters, tab, click the Add button and specify the type of parameter to add (either input or output).

  4. In the parameters grid, enter the parameter details. You can enter a default value or leave the field blank.

    If you enter a default value, you can use the default value in the event a value is not supplied for the test run, or you can use the default value as an example for the type of value that can be provided (for example, a phone number example could be ###-##-####).

Back to top

Use component parameters in component steps

For details on using the parameters as step values, see Parameterize values for operations.

Back to top

Link parameters

  1. In the document pane, select a business process test or flow.

  2. In the business process test or flow tab, select a flow or component.

  3. In the Properties pane, open the Test Parameters or Parameters tab.

  4. Select the parameter you want to link.

  5. In the Value cell of the parameter, click the Link button. The Select Link Source dialog box opens.

  6. In the left pane of the Select Link Source dialog box, select the test or flow from which you want to use a parameter.

  7. In the right pane of the Select link Source dialog box, select the parameter to which to link.

    The parameter name is displayed with a link icon in the value column indicating the link.

Tip: You can also automatically link component parameters if they share the same name as a test or flow parameter. In the BPT Testing tab of the Options dialog box (Tools > Options > BPT Testing tab), select the Always link to existing test parameters option.

Back to top

Promote parameters

Do one of the following:

In the Options dialog box
  1. Open the BPT Testing tab (Tools > Options > BPT Testing tab).

  2. In the BPT Testing tab, select the Promote component parameters option. Any parameters in components or flows added after this option is selected are promoted to test or flow parameters.

    If you do not want to automatically promote parameters for a selected component or flow, clear this option before adding the flow or component.

  3. If you do not automatically promote parameters using the options in the BPT Testing pane of the Options dialog box, you can click the Promote Parameters button in the Parameters tab of the Properties pane.

    The selected parameter is promoted to the next level and the parameter value is linked to the value of the newly created parameter.

In the Properties pane

In the Parameters tab, click the Promote Parameters button .

The selected parameter is promoted to the next level and the parameter value is linked to the value of the newly created parameter.

In the Toolbox pane In the title node, click the down arrow and then click the Promote parameters to test level button .

Back to top

Add iterations for a component or flow

Before you can set parameter values for each iteration of a component or flow, you must add iterations to the test for each component you want to run in iterations:

  1. In the document pane, select the component or component group for which to add iterations.

  2. If necessary, open the Data pane.

  3. In the Data pane, click the Add button and select one of the following to add an iteration:

    Add New Iteration: Adds a new iteration without any values for the component/group parameters.
    Copy Iteration. Copies the values for the component/group parameters from the previously entered iteration.
    Create Iteration with Default Values Adds a new iteration with the default values entered for the parameter in the Test Parameters/Parameters tab in the Properties pane.

    The new iteration and parameter values (if selected) are added as an additional row in the Data pane.

Back to top

Set data values for the parameters for each iteration

  1. In the document pane, select a flow, component, or group.

  2. In the Data pane, click in the Value cell for the parameter name. All parameters for the selected flow, component, or group are displayed in separate columns with the parameter name as column headers.

    Note: Make sure that you have also selected the correct row for the parameter - each separate row is its own iteration.

  3. Enter the parameter value for the selected parameter.

    When the test runs, the entered parameter value is used for each iteration.

Back to top

Export component parameters to an Excel

When your business process test, flow, or components contain component parameters, you can export these parameters to an Excel file. This enables many users to set values for these parameters in and run their tests with the modified data.

  1. In the document pane OR the Solution Explorer, select the business process test or flow for which you want to export the component iteration values.

  2. In the toolbar, select the Export test iteration values into Excel Document button .

  3. In the Save dialog box, specify a location in which to save the modified Excel.

  4. Click Save. UFT confirms the successful export of the Excel file.

  5. Edit the parameter values as needed. Each component containing parameters has its own Excel sheet.

    Note: If a component does not contain parameters, the Excel does not contain a sheet for that component.

Back to top

Import parameter iteration values from an Excel

If you previously exported your parameter iteration values to Excel, you can modify the parameter values in the Excel file and then import that Excel file back into the business process test. This enables you to use different data in different test runs to check how your application performs with different data.

  1. In the document pane OR the Solution Explorer, select the business process test or flow for which you want to import the component/flow parameter iteration values.

  2. In the toolbar, select the Import Excel values to parameter iteration values button .

  3. In the Open dialog, specify a location from which to import the modified Excel.

  4. Click Open. UFT confirms the successful import of the Excel file. The component parameter iteration values are now displayed in the Data pane for the component parameters and iterations.

Back to top