Testing the Application with UFT One After Registering the Testing Agent

In this section, you register the Testing Agent for the QuickID application and repeat the steps you performed before to record a UFT One 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.

Register the Testing Agent and record a UFT One GUI test on the QuickID application:

  1. Deploy the Testing Agent provided in the sample:

    1. In a user account with administrator privileges, open a command window and navigate to <UFT One Testing Extensibility installation folder>\samples\QuickID<Visual Studio version>\bin. Run install.bat to register the Testing Agent.

      Note: When UAC is on, run the install.bat using “Run as administrator”.

      The Testing Agent for the QuickID application is registered.

    2. Copy the <UFT One Testing Extensibility installation>\samples\QuickID\<Visual Studio Version>\dat\TEASampleEnvironment.xml testing environment file to the <UFT One installation folder>\dat\Extensibility\TEA folder to deploy the test object definitions for the QuickID sample.

  2. Run the sample application:

    Browse to the <UFT One 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 One. When you run the QuickID application, it creates a singleton Testing Agent. When UFT One is then opened, it uses this instance. However, if you open UFT One before opening the application, UFT One and the application each create separate Testing Agents that do not communicate with each other.

  3. Open UFT One. UFT One 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 UFT One Help Center for instructions.)

  4. Select the check box for TEAQuickIDSample and click OK. UFT One opens and runs the Testing Agent.

  5. In UFT One, 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 UFT One User Guide.

  6. Perform the following operations on the QuickID application:

    1. Enter your name in the text box.

    2. Click the down arrow and select a city from the list.

    3. Click the OK button.

    UFT One records the operations you perform.

  7. In UFT One, stop the recording session. The recorded test steps should look something like this:

    UFT One 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 One displays a generic icon for the test objects.

After the Testing Agent is registered you can also create tests in UFT One 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 One displays. A default test object method is defined for each test object.