Keyword GUI automated components are reusable modules that perform a specific task when testing your application. The tasks are defined as keyword steps. These steps can be viewed and edited both in ALM and in UFT.
ALM provides an Automation tab > Keyword View pane, which enables the subject matter expert to create and modify automated keyword steps. For user interface details on the Keyword View, see Keyword View Pane.
Each step is made up of an item (an object in the application or an operation), and an operation. The available items and operations are defined by the automation engineer in the object repository and the function libraries. These objects and operations can be saved in ALM, making them available for insertion into steps by the subject matter expert.
The objects in a Sign-in login window may be captured in the object repository in Unified Functional Testing as follows:
For a sample workflow of using Business Process Testing and Unified Functional Testing keyword GUI automation together, see Working with Unified Functional Testing.
Tests perform operations on objects. Objects are contained in the shared object repository that is associated with the application area on which your business component is based.
Objects can be sibling and child objects of the previous step's object.
Note: If an object included in a step is later removed from the shared object repository by the automation engineer, the run of the automated component fails.
Operations, or keywords, are customized functions that may group together multiple steps, as well as programming logic that can perform a specific task in your application. For example, you can use an operation to open an application at the start of a business component, or check the value of a specific property of an object in your application.
Business Process Testing provides a set of basic keywords for you to use. The automation engineer can add to or enhance the keywords in UFT. These keywords are derived from built-in methods and properties, as well as user-defined functions associated with the application area. The automation engineer manages the keywords and selects which of them should be available in the Select an Item list when creating automated components.
Note: If an operation included in a step is later removed from the library by the automation engineer, the run of the automated component fails.
For details on managing keywords, see the information about GUI testing and the Keyword View in the Micro Focus Unified Functional Testing User Guide.
An operation argument provides the specific information that an operation uses to accomplish a specific purpose.
A particular operation may have required arguments, optional arguments, or no arguments at all.
- The argument of an edit box Set operation indicates the specific value to enter in the edit box.
- The argument numbers for a Click operation can optionally indicate the specific coordinates of the click.
In the keyword view, Value cells are partitioned according to the number of possible arguments of the selected operation. Each partition contains different options, depending on the type of argument that can be entered in the partition.
You can define input parameters that pass values into your business component, and output parameters that pass values from your component to external sources or from one step to another step. You can also define local parameters for use within the component only. You can then use these parameters to parameterize input and output values in automated steps. You can define the following parameters from within a keyword step:
- Local parameter. A local parameter is defined for a specific business component. It is not accessible by other business components. You define local parameters in the Keyword View Pane using the Value Configuration Options Dialog Box for input parameters and the Output Options Dialog Box for output parameters. You cannot delete local parameters, but you can cancel their input or output.
- Component parameter. A component parameter whose value is set can be returned to or retrieved from a location outside the component. The values of these parameters can be passed from one component in a business process test or flow to a later one during a test run. You define component parameters in the Parameters Page of the Business Components module. For task details on working with component parameters, see How to Handle Data in Business Process Testing.
After you define a parameter you can use it to parameterize a value. You can also change the parameterized value back to a constant value by entering it directly in the Value cell.
For steps that return an output value, you can define 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.
Output values are stored only for the duration of the run session. When the run session is repeated, the output values are recaptured.
After the run session, you can view the values retrieved during the session as part of the session results. For details, see View run results.
You can select a number of properties to output for the same object and define the output settings for each property value. When the output value step is reached during the run session, UFT retrieves all of the specified property values.
If, after you specify an output value, you choose not to save the output value, you can cancel it.
BPT Packaged Apps Kit users can also add output values to a component during the Learn process.
A comment is a free text entry that you can enter on a new line below the currently selected step.
Comments are not processed when business components run.
You can use comments for several purposes.
- You may want to add comments to a business component to improve readability and make it easier to update. For example, you may want to add a comment before each section of a component's automated steps to specify what that section includes.
- You may want to use comments to plan steps to be included in a business component before your application is ready to be tested. Then, when the application is ready, you can use your plan (comments) to verify that every item that needs to be tested is included in the steps.
Note: After you insert a comment, you cannot change it to a step.
When creating a component, automation engineers working in UFT can add standard checkpoints. A checkpoint compares the current value of a specified property with the expected value for that property, and can help identify whether your application is functioning correctly.
When a component containing one or more checkpoints runs, UFT compares the expected value of the checkpoint to the actual value. If the value does not match, the checkpoint fails. You can view the results of the checkpoint in the Run Results Viewer. For details, see View run results.
BPT Packaged Apps Kit users can also add object property checkpoints to a component during the Learn process.