Signature files

Relevant for: API testing only

The signature file describes the activity to UFT One. It typically has a Resource element followed by the following sections: GeneralProperties, InputProperties, OutputProperties, Tabs, and Events. The signature file must have an .xml extension.

This topic describes the information that can be contained in the signature file.

Resource element

Attributes Description
type The type of entity. In this case, the type is Activity.
id

A unique string that identifies the activity.

This string is used when writing event handler code for the activity.

version The version of the current addin mechanism, for example 1.0.0
group The parent group (in the Toolbox) pane to which to add the activity.
shortname The short name of the activity displayed in the hint area of the Toolbox pane.
description The description of the activity displayed in the hint area of the Toolbox pane.
assembly

The DLL file to call when running the activity.

This .dll file is stored in the same folder as the signature and addin files.

className

The class implemented by the activity.

This class must inherit from the STActivityBase class.

image

An image file for the icon representing the activity.

This image is stored in the same folder as the signature file.

visible A boolean value indicating whether to display the activity in the Toolbox pane
xmlns

The namespace defining the schema for the signature file.

Keep the default value.

xmlns:xsi

The schema instance used for the signature file.

Keep the default value.

xmlns:Location

The URL of the signature file's schema (Signature.xsd), referenced by the name space.

Keep the default value for this.

Back to top

Section element

Attributes Description
name

The internal name of the section.

If you use a sub-element, we recommend that you set the value of the name of the sub-element, for example name="Tab" or name="Alerts".

source A boolean value indicating the source of the section.
dest A boolean value indicating the destination path of the section.
checkpoint A boolean value indicating whether to display a checkpoint checkbox in the Validate column for the activity.
isSharedMetadata A boolean value indicating whether to share the section's meta data with other sections.
propertiesType The type of the properties in the section, for example, "XML"
showXmlControls A boolean value indicating whether to display the Text and XPath tabs in the Input/Checkpoints tab.
displayName The name of the section as it will be displayed in the Properties pane.

Back to top

Section element - sub-attributes

Attributes Description
Tab

The tabs to display in the Properties pane for the activity. This sub-element can include the following attributes:

  • name. The internal name of the tab. Some of the built-in ones are General, InputOutput, Events, Attachments, and SOAPFault.

  • id. The id of the tab referred to be the API. The id usually uses the name with an added suffix, "Tab". For example, GeneralTab, InputOutputTab, and EventsTab.

  • CanBeInToolbox. A boolean value indicating if the activity can be shown in the Toolbox pane's toolbar

  • CanBeInPropertySheet. A boolean value that indicates if the activity's tab is displayed in the Properties pane.

  • CanBeInDataLinkDialog. A boolean value that indicates if the activity can be displayed in the Select Link Source dialog box.

To use the default tabs - General, Input/Checkpoints, and Events, you do not need to include this element. If you want to omit one of the tabs or add extra ones, then you need to include the Tabs sub-element and specify the desired tabs.

Alert

Enables you to use alerts for the properties in the section. This sub-element can include any of the following attributes:

  • constraint. The reason to show the alert, for example, NullValueConstraint.

  • target. The Xpath of the property to which to apply the constraint.

  • section. The internal name of the section containing the properties.

  • type. The type of alert, such as error or warning

Events

The events that are available for event handler code in this activity. This sub-element can include any of the following attributes:

name.

The internal name of the event. Use one of the built-in names or define a custom one.

  • CodeCheckpointEvent. Enables you to create an event handler to run when the test is verifying checkpoints.

  • BeforeExecuteStepEvent. Enables you to create an event handler to run before executing the activity.

  • AfterExecuteStepEvent. Enables you to create an event to run after executing the activity.

  • <custom event>. A custom event that you define.

description.

A textual description of the event.

eventArgs.

The source of the arguments for the event. The standard argument for BeforeExecuteStepEvent and AfterExecuteStepEvent event is STActivityBaseEventArgs. The built-in value for the CodeCheckpointEvent is CheckpointEventArgs.

To access the default events: CodeCheckpoint, BeforeExecute, and AfterExecute, you need to include only the Events tab in the Tab sub-element, but you do not need to use the Events sub-element. If you want to omit one of the events or add custom events, then you need to include this sub-element and specify the desired events.

Back to top