Building a reusable component (action)

The controller was designed to load, configure, and execute Action Based Testing (ABT) or Business Process Testing (BPT), which are classes built as command wrappers with a common Run method in which the main flow of the Action is implemented. In this section, we will see how to implement such an action.

Getting ready

From the File menu, navigate to New | Function Library…, or use the Alt + Shift + N shortcut. Save the file as cls.Actions.vbs in the C:\Automation\Lib folder.

How to do it...

As mentioned before, a reusable component (action) is a class that implements the command wrapper design pattern. The following code shows the sample class Login as a typical example for an Action within this framework:

Class ...

Get Advanced UFT 12 for Test Engineers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.