The Test Object Configuration XML File

The first stage of developing support for a custom toolkit is to define the test object classes that you want OpenText Functional Testing to use to represent your application controls. You define the test object classes in a test object configuration XML file. You need to create a test object class for every type of custom control for which you want to extend or modify OpenText Functional Testing support.

Overview

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 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 OpenText Functional Testing 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 OpenText Functional Testing opens, the information in this XML is not loaded. 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 OpenText Functional Testing, in the <OpenText Functional Testing installdir>\dat folder. (For backward compatibility reasons, certain XML structures that do not pass validation against this XSD are still supported.)

Back to top

A Test Object Class Definition

The sections below describe the information that you can include in a test object class definition. Class name and type, methods and properties, an icon file, and a Help file.

Class Name and Base Class

The name of the new test object class and its attributes, including the base class—the test object class that the new test object class extends. A new test object class extends an existing WPF or SilverlightOpenText Functional Testing test object class, directly or indirectly. The base class may be a class delivered with OpenText Functional Testing or a class defined using WPF or Silverlight Add-in Extensibility. (A WPF test object class must extend a WPF test object class and a Silverlight test object class must extend a Silverlight test object class.)

By default, the base class is WPFObject or SlvObject.

The test object class name must be unique among all of the environments whose support might be loaded simultaneously. For example, when defining a new test object class, do not use names of test object classes from existing OpenText Functional Testing add-ins, such as WpfButton, WpfEdit, or SlvButton.

Note:

  • A test object class inherits the base class' test object operations (methods and properties), generic type, default operation, and icon. Identification properties are not inherited.

  • If you create test object classes that extend test object classes defined in another toolkit support set, you create a dependency between the two toolkit support sets. Whenever you select to load the extending toolkit support set in the OpenText Functional Testing Add-in Manager, you must also select to load the toolkit support set that it extends.

Generic Type

The generic type for the new test object class, if you want the new test object class to belong to a different generic type than the one to which its base class belongs. (For example, if your new test object class extends WpfObject or SlvObject (whose generic type is object), but you would like to group this test object class with the edit test object classes.)

Generic types are used when filtering objects (for example, in the Step Generator's Select Object for Step dialog box and when adding multiple test objects to the object repository). Generic types are also used when creating documentation strings for the Documentation column of the Keyword View (if they are not specifically defined in the test object configuration file).

Test Object Operations

A list of operations for the test object class, including the following information for each operation:

  • The arguments, including the argument type (for example, String or Integer), direction (In or Out), whether the argument is mandatory, and, if not, its default value.

  • The operation description (shown in the Object Spy and as a tooltip in the Keyword View and Step Generator).

  • The Documentation string (shown in the Documentation column of the Keyword View and in the Step Generator).

  • The return value type.

  • A context-sensitive Help topic to open when F1 is pressed for the test object operation in the Keyword View or Editor, or when the Operation Help button is clicked for the operation in the Step Generator. The definition includes the Help file path and the relevant Help ID within the file.

Default Operation

The test object operation that is selected by default in the Keyword View and Step Generator when a step is generated for an object of this class.

Identification Properties

A list of identification properties for the test object class. You can also define:

  • The identification properties that are used for the object description.

  • The identification properties that are used for smart identification. (This information is relevant only if smart identification is enabled for the test object class. To enable smart identification, use the Object Identification dialog box in OpenText Functional Testing.)

  • The identification properties that are available for use in checkpoints and output values.

  • The identification properties that are selected by default for checkpoints (in the OpenText Functional Testing Checkpoint Properties dialog box).

When defining identification properties, it is recommended to start by copying existing identification properties from the base object in your schema or from similar objects in related toolkits.

Icon File

The path of the icon file to use for this test object class. (Optional. If not defined, the base class' icon is used.) The file can be a .dll, .exe, or .ico file.

Help File

A context-sensitive Help topic to open when F1 is pressed for the test object in the Keyword View or Editor. The definition includes the .chm Help file path and the relevant Help ID within the file.

For details on the syntax and structure of a test object configuration file, see the OpenText Functional Testing Test Object Schema Help.

Back to top

Sample Test Object Configuration File

An example of a WPF Add-in Extensibility test object configuration file is shown below. In a Silverlight Add-in Extensibility test object configuration file, the AddinName attribute in the TypeInformation element needs to be set to Silverlight.

In addition, in the toolkit name that you provide in the PackageName attribute, you may want to include an indication as to whether this is a WPF or Silverlight toolkit. This is recommended because the Add-in Manager in OpenText Functional Testing displays both WPF and Silverlight Add-in Extensibility supported environments as child nodes under the WPF add-in node.

<TypeInformation Load="true" AddinName="WPF" PackageName="MyWpfToolkit“>
     <ClassInfo Name="MyWpfButton" BaseClassInfoName="WpfButton" 
               ROTypeInfo="false" 
               GenericTypeID="button" 
               DefaultOperationName="Click" 
               FilterLevel="0“>
        <IconInfo 
            IconFile="INSTALLDIR\dat\Extensibility\WPF\MyWpfButton_icon.ico"/>
        <TypeInfo>
               <Operation Name="Click“>
                    <Argument Name="X" IsMandatory="false" 
                                   DefaultValue="-9999" Direction="In“>
                         <Type VariantType="Integer"/>
                    </Argument>
                    <Argument Name="Y" IsMandatory="false" 
                                   DefaultValue="-9999" Direction="In“>
                         <Type VariantType="Integer"/>
                    </Argument>
                    <Argument Name="MouseButton" IsMandatory="false" 
                                   DefaultValue="0" Direction="In“>
                         <Type VariantType="Enumeration" 
                                   ListOfValuesName="E_ButtonType"/>
                    </Argument>
               </Operation>
         </TypeInfo>
         <IdentificationProperties>
              <IdentificationProperty Name="devname" ForDescription="true"/>
              <IdentificationProperty Name="enabled" ForDescription="false"
                                             ForVerification="true"/>
          </IdentificationProperties>
     </ClassInfo>
</TypeInformation>

Back to top