When you develop .NET Add-in Extensibility, you map custom .NET Windows Forms controls to existing UFT One .NET Add-in test object classes and to Custom Servers that you develop.
The first mapping determines the test object class that UFT One uses to represent the custom control. The second specifies the Custom Server to use. The Custom Server extends the functionality of the test object that is used for the control to match the control's functionality.
If UFT One recognizes a .NET control out-of-the-box, and uses a .NET add-in test object other than SwfObject to represent it (for example SwfEdit or SwfList), then you cannot map this control to any other test object type. However, you can still map it to a Custom Server and extend the test object functionality.
Map the custom controls to test objects by using the MappedTo attribute in the UFT One .NET Add-in Extensibility's System Windows Forms configuration file (SwfConfig.xml). Map each custom control to a UFT One test object class containing behaviors that are similar to those required to support your control.
If you do not specify a mapping, UFT One maps the custom control to the default generic test object, SwfObject. For more information on SwfConfig.xml, see Understanding How to Configure UFT One Windows Forms Extensibility.
Note: Mapping is sometimes sufficient without any programming. If the existing UFT One test object adequately covers a control, it is sufficient to map the control to the UFT One test object.
When you map your control to a functionally similar UFT One test object, then, in your Custom Server, you do not need to override test object methods that apply without change to your custom control. For example, most controls contain a Click method. If the Click method of the existing test object implements the Click method of the custom control adequately, you do not need to override the existing object's method.
To cover the Test Run functionality of the custom object that does not exist in the existing object, add new methods in your Custom Server. To cover functionality that has the same method name, but a different implementation, override the existing object's methods.
If the UFT One test object adequately covers Test Record, but you need to customize Test Run, do not implement Test Record. If you do implement Test Record, the implementation replaces that of the existing object. You must implement all required Test Record functionality.
In UFT One, when you edit a step with the test object that you customized to support the custom control, the statement completion feature displays the custom properties and methods that you defined for the test object, in addition to those that exist in UFT One. UFT One uses test object configuration files to provide the list of custom test object methods and properties.