For the COM object to become a Testing Agent and enable UFT One to recognize and operate on objects in your environment, the COM object must implement interfaces defined in AutInterface.idl, located in <UFT One Testing Extensibility SDK installation folder>\SDK\Ifs.
The most important interface in the UFT Extensibility Agent type library is ITestable. This interface defines the methods that the Testing Agent must implement to support the basic UFT One abilities. The ITestable interface is therefore considered mandatory in the development of the Testing Agent.
In the initial development stages, the QuickID Testing Agent was designed to implement only the ITestable interface. (In the later stages of developing the Testing Agent, Stage 7: Implementing Support for Recording and Stage 8: Implementing Support for the Object Spy, additional interfaces are implemented.)
For this purpose, the UFT Extensibility Agent type library was imported and the Testing Agent class was defined to inherit from the ITestable interface, as follows:
Importing the UFT Extensibility Agent type library
In the TEASample.idl file, the line:
importlib("AutInterface.tlb");was added to the
TEASampleLibtype library definition.
The AutInterface.tlb file imported by the type library is located in the <UFT One Testing Extensibility SDK installation folder>\SDK\Ifs folder.
Inheriting from the ITestable interface
The following steps were performed to define that the Testing Agent implements the ITestable interface:
In the TEASample.idl file, the coclass TEASampleTestableImp definition was modified to indicate that it implements the ITestable interface.
In the TEASampleTestableImp.h file:
The following line was added to the CTEASampleTestableImp class inheritance list:
public IDispatchImpl<ITestable, &__uuidof(ITestable), &LIBID_AutInterface>
The following line was added to the CTEASampleTestableImp class' COM Map:
All of the methods in the ITestable interface were declared members of the CTEASampleTestableImp class.
In the TEASampleTestableImp.cpp file, all of the ITestable methods were added with a default implementation returning