Open topic with navigation
In this section, you register the Testing Agent for the QuickID application and repeat the steps you performed before to record a UFT GUI test with the assistance of the Testing Agent. The new test uses the more meaningful test objects and test object methods defined by the Testing Agent.
Deploy the Testing Agent provided in the sample:
In a user account with administrator privileges, open a command window and navigate to <UFT Testing Extensibility installation folder>\samples\QuickID<Visual Studio version>\bin. Run install.bat to register the Testing Agent.
Note: On Windows 8 or when UAC is on, run the install.bat using “Run as administrator”.
The Testing Agent for the QuickID application is registered.
Copy the <UFT Testing Extensibility installation>\samples\QuickID\<Visual Studio Version>\dat\TEASampleEnvironment.xml testing environment file to the <UFT installation folder>\dat\Extensibility\TEA folder to deploy the test object definitions for the QuickID sample.
Run the sample application:
Browse to the <UFT Testing Extensibility installation folder>\samples\QuickID\<Visual Studio version>\bin folder and double-click the QuickID.exe file.
Caution: For the QuickID sample, you must run the application before opening UFT. When you run the QuickID application, it creates a singleton Testing Agent. When UFT is then opened, it uses this instance. However, if you open UFT before opening the application, UFT and the application each create separate Testing Agents that do not communicate with each other.
Open UFT. UFT recognizes the registered Testing Agent and displays its environment's name (TEAQuickIDSample) in the Add-in Manager dialog box. (If the Add-in Manager dialog box does not open, see the Micro Focus Unified Functional Testing Add-ins Guide for instructions.)
Select the check box for TEAQuickIDSample and click OK. UFT opens and runs the Testing Agent.
In UFT, make sure that the Record and run test on any open Windows-based application option is selected in the Record and Run Settings dialog box, and start a recording session. For more information, see the Micro Focus Unified Functional Testing User Guide.
Perform the following operations on the QuickID application:
Enter your name in the text box.
Click the down arrow and select a city from the list.
Click the OK button.
UFT records the operations you perform.
In UFT, stop the recording session. The recorded test steps should look something like this:
UFT now recognizes the objects in this application more specifically, using environment-specific test objects to represent them. Each test object also uses specific test object methods. This Testing Agent does not define specific icons to use for its test objects, therefore UFT displays a generic icon for the test objects.
After the Testing Agent is registered you can also create tests in UFT without using the recording mechanism. In the Define New Test Object dialog box, select the TEAQuickIDSample environment and then select from the environment-specific test objects that UFT displays. A default test object method is defined for each test object.