About Developing the UFT Testing Agent

After you decide how to implement the Testing Agent and determine the object model that the Testing Agent will support as described in Planning Your UFT Testing Agent, you can begin to implement UFT Testing Extensibility. The first step is to implement the ITestable interface defined in the UFT Extensibility Agent type library. This interface provides support for the most basic UFT capabilities.

The ITestable interface is the only interface in the Testing Extensibility SDK that is mandatory. By implementing this interface, you enable UFT to recognize objects and run GUI tests on applications developed in your environment. In addition, you support the retrieving of run-time values of test object identification properties and the adding of test objects to the object repository.

After implementing the ITestable interface, you can implement the additional interfaces in the UFT Testing Extensibility SDK. These support more advanced UFT capabilities such as Record, Active Screen, Object Spy, Highlight, and more. For more information, see Enhancing Your UFT Testing Agent.

The table below specifies the main UFT capability for which each ITestable method is used:

UFT Capability

API Method

Recognizing the testing environment

GetTestingEnvironment (handshake)

Object recognition

BuildDescription, FindObjectId, FindObjectId2, GetDisplayName, GetParent, GetChildren

Running tests

Run

Retrieving object identification property values

GetElementType, GetProperties, GetTabularData, GetTabularAttributes

Providing meaningful error messages

GetLastError

Learning objects

LearnChildObjects, CompareObjectId

Note:  

Develop your agent in stages, testing after you develop each stage:

  1. Develop the Testing Agent's handshake with UFT.

    Implement only the initial handshake between the Testing Agent and UFT. This enables UFT to recognize the testing environment so that you can write UFT GUI tests with objects and operations defined in your environment.

  2. Create support for recognizing objects and running tests.

    Implement the methods required for UFT to recognize a few objects and run tests.

  3. Create support for retrieving identification property run-time values.

    Implement the methods required for UFT to retrieve identification property run-time values from the application being tested.

  4. Create support for learning objects.

    Implement the methods required for UFT to learn objects and add them to the object repository.

  5. Extend the support you created to include all of the objects in your environment.

    Complete the definition of your testing environment to include all of the objects in your environment. Implement support for all of the test objects and operations in your environment. Implement any remaining methods in the ITestable interface.

For more information, see Before You Begin.