Open topic with navigation
Before you begin the implementation, read this guide to learn what information you will need to provide to UFT. Then make the following decisions:
In what language will I implement the Testing Agent?
You can use any language that supports COM.
How will the Testing Agent communicate with the application being tested?
You can use any technique appropriate to the technology of the application being tested.
The Testing Agent retrieves information from the running application about the objects being tested and the relationships between them. The agent performs operations on the visible objects in the application.
If there can be more than one instance of the application, the Testing Agent must handle multiple instances.
How will the Testing Agent be launched?
When UFT opens, it launches the Testing Agent if the UFT user selected the relevant environment in the Add-in manager dialog box. However, if the application being tested is opened before UFT, you might want the Testing Agent to be launched earlier. One solution is to implement the Testing Agent as a singleton object and have the application run it. This way the Testing Agent is created by UFT or by the application, depending on which runs first. In addition, it will remain alive as long as the application or UFT are using it. This prevents synchronization issues if the application being tested or UFT are closed and reopened.
Caution: You must implement the Testing Agent to run out-of-process to ensure that the Testing Agent does not run in UFT's context.
How do I make sure that no unnecessary activity takes place if UFT is not testing the application?
Users can run their applications independently of UFT, with no intention of running tests on them. In this case, the Testing Agent either should not open or should open but not perform any unnecessary operations.
You might implement a flag that indicates whether or not the Testing Agent should be active. One way to determine when to set the flag is by checking if UFT is installed on the computer. For information on how to check in UFT is installed, see Checking Whether UFT Is Installed. Another way is to design the Testing Agent not to perform any unnecessary operations unless UFT initiates communication. A third option is to allow the users to indicate whether or not testing is required when they open the application.
How will the Testing Agent be provided to the users?
You can provide the Testing Agent to the UFT users as part of your software installation or separately.