Share this page

# How to Work with Keyword GUI Automation

This task describes how to automate a component by adding keyword GUI steps to the component.

Note:

- This task is part of a higher-level task. For details see Working with Business Process Testing.
- For a sample workflow of using Business Process Testing and keyword GUI automation together, see Working with Unified Functional Testing.

1. Prerequisites

   - Make sure a testing tool, such as UFT, is installed.

     Tip: If a testing tool is not installed, the button in the Automation tab is disabled.

   - Install the Unified Functional Testing Add-in for Business Process Testing on the client computer. The Unified Functional Testing Add-in for Business Process Testing is available from the Application Lifecycle Management Add-ins page (Help > Add-ins).

   - To be able to debug or run automated keyword GUI components, or view test results, make sure that UFT 12.00 or later is installed.

2. Create an application area

   Automating components involves the creation of application areas, which provide access to the settings and resources required for a particular application.

   1. Make sure that your application is ready to be tested, and all of the required automation resources have been prepared.
   2. In UFT, if not yet connected, connect to the ALM project (for which you want to create the application area).

   For details, see the information about connecting to ALM projects in the Micro Focus Unified Functional Testing User Guide.

   3. Do one of the following:

      - Create a basic application area based on a default template in the ALM Test Resources module. The default application area template is stored in the System Application Areas subfolder and cannot be moved or modified. An automation engineer can then enhance the application area in UFT.

        The default application area contains very limited operation options from which to choose when created automated steps.

      - Work with an automation engineer to create the application area in UFT.
   4. In ALM, create and upload the application area resource in the Test Resources module. You can also create other resources with which the application area is associated, such as libraries, object repositories, and recovery scenarios in ALM (and associate them to the application area in UFT). For details, see the Micro Focus Application Lifecycle Management User Guide: How to Use Test Resources.
   5. In UFT, define the settings and resource files that you want business components associated with the application area to use. By associating a component with an application area, the component is automatically linked to these settings and resource files.

   6. In UFT, define dependencies between entities. For details, refer to the Micro Focus Unified Functional Testing User Guide.

   Tip: You can view the associations between the application area and the other resources in the Dependencies tab in the Test Resources module in ALM.

3. Select a component

   In the Business Components module window, select a component in the component tree.

4. Add keyword GUI automation

   In the Automation tab, click and select Keyword GUI.

   The Keyword View pane is displayed. For user interface details, see Keyword View Pane.

5. Select the application area

   Note:

   A keyword GUI component must be associated with an application area to create steps for it, but you can also change the application area when required.

   Changing an application area may affect the automated component and prevent it from running correctly. For example, if a step uses an object that is not contained in the object repository of the new application area, the step fails.

   In the Keyword View pane, select an application area if the following message appears next to the toolbar buttons:

   `Choose an application area by clicking the 'Select Application Area' button`

   Select an application area by clicking . For user interface details on the Select Application Area dialog box, see Select Application Area Dialog Box.

   All application objects in the associated object repository, and any operations defined in associated function libraries, are now available when automating steps.

6. Add content (steps)

   Create the steps required to test your application.

   Each step is an operation to be performed, and is defined as a row in the Keyword View pane.

   For each step you add or modify, you specify:

   - The item, such as an object from the application area's shared object repository, on which the step is performed.
   - The operation (keywords specified in the application area) to be performed on the item.
   - Any required values.
   - Output values.
   - Documentation, such as comments.

   Save the steps.

   Tip:

   - Since changes you make in the Keyword View pane are not saved automatically, it is recommended that you save them periodically.

   - A component is not fully automated until all of its steps are automated. For example, if you specify an Operation item with an Operation value of ManualStep, the automation is not yet complete. When running the component, there is a pause for user input.

   - You can record steps in other applications, creating components at the same time. For details, see How to Record Components into Flows and Business Process Tests.

   - You can scan objects into the local object repository directly from within ALM instead of only from within UFT. For details, see Scan Kwd in Keyword View Pane.

   For conceptual details on the entities used to create steps, such as items and operations, see Keyword GUI Automation Overview.

   For user interface details on the Keyword View pane, see Keyword View Pane.

7. Parameterize steps

   To expand the scope of your tests, flows, and business components, use variable input and output parameter values in your automated components.

   To parameterize... | Use the...
   --- | ---
   Input values for a step using local or component parameters | Value Configuration Options Dialog Box
   Output values for a step | Output Value Properties Dialog Box
   Expected property values from the Checkpoint Properties dialog box or the Output Value Properties dialog box | Output Value Properties Dialog Box

   Save the steps.

8. Enhance steps - optional

   You can enhance your automated components by adding the following enhancements to your steps.

   Enhancement | Description
   --- | ---
   Comments | Comments provide additional information in the form of free-text. You can insert comments between, and as placeholders for, step operations. For conceptual details about comments, see Keyword GUI Automation Overview. For user interface details, see Keyword View Pane.
   Checkpoints | Checkpoints compare the current value of a specified property with the expected value for that property, and can help identify whether your application is functioning correctly. For conceptual details, see Keyword GUI Automation Overview. The checkpoint is visible and editable in the Checkpoint Properties dialog box in ALM, enabling you to view which properties are set to be checked during the run. For user interface details, see Checkpoint Properties Dialog Box.
   Output Values | For steps that return a value, output values store settings that determine where the output value is stored and how it is used during the component run session. When the output value step is reached, each value set for output is retrieved and stored in the specified location for use later in the run session. For conceptual details about output values, see Output Value Overview. For user interface details, see Output Value Properties Dialog Box.

   Save the steps.

9. Results

   - The automation of the component is complete.
   - The icon for the component changes from the manual icon to the automated icon. For icon details, see Business Process Testing Icons.
   - The automated component can be accessed from UFT.
   - Tests and flows that contain fully automated components can run in an automatic runner without pausing for user input.

https://admhelp.microfocus.com ALM 8942
Tips to improve your search results... ALM Help Center ALM Help Center ALM Help 15.5-15.5.1 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: