Designing Your Test Object Configuration XML File

In this file, you define any custom test object classes that you want UFT One to use to represent your custom controls in tests and components. Define a test object class for each custom control that cannot be adequately represented by an existing Delphi test object class.

In a test object configuration XML, you define the test object classes (for example, the test object methods they support and their identification properties).

You can also create a definition for an existing test object class in the test object configuration XML. This definition is added to the existing definition of this test object class, affecting all test objects of this class. It is therefore not recommended to modify existing test object classes in this way. For example:

  • If you add a test object method, it appears in the list of test object methods in UFT One, but if you use the test object method in a test, and it is not implemented for the specific object, a run-time error occurs.

    If you add test object methods to existing test object classes, you might add a prefix to the method name that indicates the toolkit support for which you added the method (for example, CustomButtonClick, CustomEditSet). This enables test designers to easily identify the custom methods and use them in test steps only if they know that the custom method is supported for the specific object.

  • If you add an identification property, it appears in UFT One in the list of properties for all test objects of this class, but has no value unless it is implemented for the specific supported object.

In the test object configuration XML file, you create a ClassInfo element for each test object class that you want to define. In addition, you define the name of the environment or custom toolkit for which the test object classes are intended (in the PackageName attribute of the TypeInformation element), and the UFT One add-in which these test object classes extend (in the AddinName attribute of the TypeInformation element).

If the relevant add-in is not loaded when UFT One opens, UFT One does not load the information in this XML. Similarly, if the name of the environment or custom toolkit is displayed in the Add-in Manager dialog box and its check box is not selected, the information in this XML is not loaded.

To ensure the structural correctness of your test object configuration file, you can validate it against the ClassesDefintions.xsd file. This file is installed with UFT One, in the <UFT One installation folder>\dat folder. (For backward compatibility reasons, UFT One still supports certain XML structures that do not pass validation against this XSD.)

For information on the structure and syntax of this XML, see the UFT One Test Object Schema Help.

The sections below describe the information that you can include in a test object class definition.