Planning the Testing Agent Characteristics

Before you begin the implementation, read this guide to learn what information you will need to provide to UFT One. 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 One opens, it launches the Testing Agent if the UFT One user selected the relevant environment in the Add-in manager dialog box. However, if the application being tested is opened before UFT One, 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 One or by the application, depending on which runs first. In addition, the Testing Agent will remain alive as long as the application or UFT One are using it. This prevents synchronization issues if the application being tested or UFT One 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 One's context.

  • How do I make sure that no unnecessary activity takes place if UFT One is not testing the application?

    Users can run their applications independently of UFT One, 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 One is installed on the computer. For information on how to check in UFT One is installed, see Checking Whether UFT One Is Installed. Another way is to design the Testing Agent not to perform any unnecessary operations unless UFT One 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 One users as part of your software installation or separately.