Testing Your Support for Learning Objects

After implementing all of the methods in the ITestable interface and the GetElementFromPoint method in the ISpyable interface, you can perform a comprehensive test of the basic functionality of your Testing Agent.

To perform this test, you use the Add Objects option in UFT One to add objects to the object repository, then create tests with these objects and run them on your application.

To test your support for learning objects:

  1. Do the following, as described in Testing Your Support for Running Tests:

    1. Ensure that the Testing Agent and UFT One are closed and upgrade the Testing Agent.

    2. Open UFT One and run the Testing Agent.

    3. Create a UFT One GUI test with objects from your environment.

  2. In UFT One, perform one of the following:

    • In the Object Repository window, select Object > Add Objects to Local or click the Add Objects to Local toolbar button .

      UFT One and the Object Repository window are minimized and the pointer becomes a pointing hand.

    • In the Object Repository Manager, select Object > Add Objects or click the Add Objects toolbar button .

      UFT One and the Object Repository Manager are minimized and the pointer becomes a pointing hand.

  3. Click the object you want to add to your object repository.

  4. If the location you click is associated with more than one object, the Object Selection dialog box opens. Select the object you want to add to the repository and click OK.

  5. If the object you selected contains other objects, the Define Object Filter dialog box opens. Select All object types and click OK.

    The object you selected is added to the object repository with all of its descendants. The Object Repository window is refreshed, showing the new test objects and their properties and values.

    UFT One also adds the new object's parent objects if they do not already exist in the object repository.

    For more information, see the UFT One User Guide.

  6. In the object repository, make sure that the object is added correctly. Check the parents and children of the object to ensure that the hierarchy is defined correctly. Verify that the test object class and icon are the ones that you defined in the testing environment XML. Make sure that the correct identification properties are listed as description properties.

  7. Create a test that performs operations on the object that you added to the object repository. Make sure that the correct test object methods are available for this object.

  8. Run the test you created and verify that it performs correctly.