HP QuickTest Professional Test Object Schema

Advertisement:

In this post, I'm going to describes the elements and attributes available for creating test object configuration XML content to be used with your QuickTest extensibility project.
In a test object configuration XML, you define the test object classes (for example, their identification properties, the test object methods they support, and so on). To do this, you define a ClassInfo element for each test object class. In addition, you define the name of the environment for which the test object classes are intended, and the QuickTest add-in which they extend. If the relevant add-in is not loaded when QuickTest opens, QuickTest does not load the information in this XML. Similarly, if the environment name is displayed in the Add-in Manager dialog box and the check box for this environment is not selected, the information in this XML is not loaded.

A test object class definition can include the following:

- 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.

- The test object class name must be unique among all of the environments whose support a QuickTest user might load simultaneously. For example, do not use names of test object classes from existing QuickTest add-ins, such as WebButton, WebEdit, Page, etc.

- The path of the icon file to use for this test object class (Optional. If not defined, a default icon is used.) The icon file must be in an uncompressed .ico format.

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

- The methods of the new test object, including the following information for each method:

1. The arguments, including the argument type (String or Variant) and direction (In or Out)
2. Whether the argument is mandatory, and, if not, its default value
3. Whether a dynamic list of possible values for this argument can be retrieved from the supported control and displayed in the Keyword View, Expert View, and Step Generator
4. The method description (shown as a tooltip in the Keyword View, Expert View, and Step Generator)
5. The Documentation string (shown in the Documentation column of the Keyword View and in the Step Generator)
6. The return value type
7. A context-sensitive Help topic to open when F1 is pressed for the test object method in the Keyword View or Expert View, or when the Operation Help button is clicked for the method in the Step Generator. The definition includes the Help file path and the relevant Help ID within the file.

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

- The identification properties of the new test object

1. The identification properties that are used for the object description
2. The identification properties that are used for Smart Identification (Smart Identification needs to be enabled for these definitions to take effect)
3. The identification properties that are available for use in checkpoints
4. The identification properties that are selected by default for checkpoints (in the QuickTest Checkpoint Properties dialog box)

Each time you run QuickTest, it reads all of the test object configuration XMLs and merges the information for each test object class from the different XMLs into one test object definition.

Each time you open QuickTest, it reads all of the test object configuration files located in the \dat\Extensibility\ folders. QuickTest then merges the information for each test object class from the different files into a single test object class definition, according to the priority of each test object configuration file.

You define the priority of each test object configuration file using the Priority attribute of the TypeInformation element.

Please Note:

- If the priority of a test object configuration file is higher than the existing class definitions, it overrides any existing test object class definitions, including built-in QuickTest information. For this reason, be aware of any built-in functionality that will be overridden before you change the priority of a test object configuration file.

- QuickTest ignores the definitions in a test object configuration files in the following situations:

a. The Load attribute of the TypeInformation element is set to false.
b. The environment relevant to the test object configuration file is displayed in the Add-in Manager dialog box, and the QuickTest user selects not to load the environment.

When multiple test object class definitions exist, QuickTest must handle any conflicts that arise. The following sections describe the process QuickTest follows when ClassInfo, ListOfValues, and Operation elements are defined in multiple test object configuration files. All of the IdentificationProperty elements for a specific test object class must be defined in only one test object configuration file.

ClassInfo Elements:

If a ClassInfo element is defined in a test object configuration file with a priority higher than the existing definition, the information is appended to any existing definition. If a conflict arises between ClassInfo definitions in different files, the definition in the file with the higher priority overrides (replaces) the information in the file with the lower priority.

If a ClassInfo element is defined in a test object configuration file with a priority that is equal to or lower than the existing definition, the differing information is appended to the existing definition. If a conflict arises between ClassInfo definitions in different files, the definition in the file with the lower priority is ignored.

ListOfValues Elements:

- If a conflict arises between ListOfValues definitions in different files, the definition in the file with the higher priority overrides (replaces) the information in the file with the lower priority (the definitions are not merged).

- If a ListOfValues definition overrides an existing list, the new list is updated for all arguments of type Enumeration that are defined for operations of classes in the same test object configuration file.

- If a ListOfValues is defined in a configuration file with a lower priority than the existing definition, the lower priority definition is ignored.

Operation Elements:

- Operation element definitions are either added, ignored, or overridden, depending on the priority of the test object configuration file.

- If an Operation element is defined in a test object configuration file with a priority higher than the existing definition, the operation is added to the existing definition for the class. If a conflict arises between Operation definitions in different files, the definition in the file with the higher priority overrides (replaces) the definition with the lower priority (the definitions are not merged).
Advertisement:

No comments:

Post a Comment

175248765853890