Learn business process tests and flows

Relevant for: business process tests and flows

This task describes how to learn areas of your SAP application in order to create business process tests and flows. This enables you to create components based on screens or areas of your SAP application quickly.


Before learning business process tests and flows, you must do the following:

  • Install and load the Web and SAP Solutions Add-in or the SAPUI5 add-in.

  • Log in to your SAP application.

  • Create or open a business process test or flow.

  • You must be part of an ALM user group with the following task permissions: Modify Folder (Test Plan), Modify Test, Add Component Folder, Add Component, Add Step, Add Parameter, Add Resource, Modify Component, Modify Step, Modify Parameter, Modify Resource, and Delete Resource.

Back to top

Set component reuse options

In the BPT Packaged Apps Kit pane of the Options dialog box (Tools > Options > BPT Testing tab > BPT Packaged Apps Kit node), select the appropriate option to instruct UFT One on how to reuse similar or identical components:

Manually select components for reuse: This option enables you to select the components in the Learn Summary dialog box after finishing the learning session.
Automatically reuse identical components: This automatically uses existing components that are identical without prompting you after learning the application.
Ignore comments when comparing scripts This instructs UFT One to ignore comment steps when comparing learned components to existing ones.
Component Type: Select from Keyword GUI or Scripted GUI components.

Back to top

Set parameter options

In the BPT Packaged Apps Kit pane of the Options dialog (Tools > Options > BPT Testing tab BPT Packaged Apps Kit node), select how you want UFT One to reuse parameters:

  • Automatically parameterize steps using Business Component parameters: Enables you to use the Business component parameters as the step value parameters

  • Use the default values from the learned flow: Uses the values you entered when learning the flow

  • Use the values from the reused components: Use the values from the components you select for reuse.

Back to top

Perform user actions your SAP application

  1. Do one of the following:

    • In UFT One, with a business process test or flow selected, in the toolbar, press the Learn button . UFT One is minimized and the Learn toolbar is displayed.

    • In the BPT View, click the Smart Record a New Business Process Test or Flow button.

  2. Perform user actions in your SAP application. As you perform actions, the Learn toolbar provides a count of the number of steps performed in the application:

  3. When you are finished performing all the necessary actions, press the Stop button . UFT One displays a progress indicator, and adds the components to your test and to your ALM project.

Back to top

Optional - add checkpoints and output values while learning

Using the Learn Toolbar, you can also add checkpoints and output values while learning your SAP application. This eliminates the need for you to add these steps after learning components.

  1. While performing user actions in your SAP application, in the Learn toolbar, click the Insert Checkpoint or Output Value button and select the type of checkpoint to insert.

  2. If necessary, in the Object Selection dialog box, select the object on which you want to insert the checkpoint or output value.

  3. In the Checkpoint Properties dialog that opens, select the test object properties to check and click OK. The Learn toolbar counter changes to note that you added a checkpoint or output value step. In addition, this checkpoint step will be part of the learned component that is created after you stop learning the application.

Back to top

Select components

After you finish learning the screens/areas in your application, UFT One displays a summary of the learning session in the Learn Summary dialog box.

If you want to keep the learned components without reusing similar or identical components, click Create. UFT One creates the new components and saves them in your ALM project. In addition, the learned components are added to the open business process test.

Back to top

Reuse an existing component

If UFT One detects that a learned component is similar or identical to an existing component, UFT One displays the number of similar components next to the component name in the component tree.

  1. In the learned component list, select the component for comparison. In the right pane, UFT One displays the list of possible components to reuse.

  2. In the right pane, display the Available Components for Reuse section.

    Tip: If you want to view details about a similar or identical component, in the Available components list, click the arrow to the left of the component name. UFT One then displays further details about the component, including areas of similarity and the steps used in the component to be reused:

  3. From the list of available components for reuse, select a component and click the Reuse button. UFT One replaces the learned component with the existing component, and updates it with an icon in the learned components list:

  4. Repeat this process for each component that you wish to reuse.

  5. When you are finished selecting the components that should be reused, click Create. UFT One creates the new components and saves them in your ALM project.

Back to top

Remove a learned component

  1. In the component list, select the component to remove.

  2. To the left of the component, click the X button.

  3. After you have removed all the unnecessary components, click Create. UFT One creates the new components and saves them in the specified location in the ALM project.

Back to top

Resume learning components

After you create an initial test with learned components, you can resume learning components in the same test.

  1. In the document pane or the Solution Explorer, select the business process test or flow to which you want to add learned components.

  2. In the toolbar, click the Learn button.

  3. When prompted, decide how to insert newly learned components:

    Yes If you select Yes, the existing components in the test are removed and newly learned components are inserted instead.
    No If you select No, UFT One inserts the newly learned components after the already existing components in the test.
  4. Continue learning the screens/areas in your application as described in Perform user actions your SAP application.

Back to top

Edit table parameters

When learning your application, you have the additional option to learn and create special table parameters which represent a table object in the application. When UFT One creates the components after learning, the parameter is created and you can edit the values of the parameter (like other test and component parameters) using a special dialog.

To create and edit table parameters, do the following:

  1. Create or open a GUI test.

  2. In the SAP General pane of the Options dialog box (Tools > Options > GUI Testing tab > SAP > General node). select the Auto-parameterize table and grid controls option.

  3. Close the GUI test.

  4. Create or open a business process test.

  5. Perform user actions on the table objects in your application. While you perform these actions, UFT One learns the application and creates components accordingly.

  6. After performing all necessary user actions, stop the learning session and approve/reject the learned components in the Learn Summary report.

  7. In the test grid, select the component containing the table parameter. The Properties pane tabs are changed to represent the component properties.

  8. In the Properties pane, select the Parameters tab .

  9. In the Parameters tab, select the parameter representing your table object. The Properties pane identifies these by labeling them in the Value column as Table Data:

  10. In the row containing the table parameter, click the Parameter Table button . The Parameter Table Editor dialog box opens.

  11. In the Parameter Table editor, edit the parameter values as needed.

  12. When you have finished editing the table parameter, click OK to save your changes.

Back to top