Implementing Test Run for a Custom Control Using the .NET DLL

Defining test object methods for Test Run means specifying the actions to perform on the custom control when the method is run in a step. Typically, the implementation of a test object method performs several of the following actions:

Define custom Test Run methods if you are overriding existing methods of the existing test object, or if you are extending the existing test object by adding new methods.

Ensure that all test object methods recorded are implemented in Test Run, either by the existing test object or by this Custom Server.

To define custom Test Run methods, define an interface and instruct UFT to identify it as the Test Run interface by applying the ReplayInterface attribute to it. Only one replay interface can be implemented in a Custom Server. If your interface defines methods with the same names as existing methods of the existing object, the interface methods override the test object implementation. Any method name that is different from existing object's method name is added as a new method.

Start a test object method implementation with a call to PrepareForReplay, specify the activities to perform, and end with a call to ReplayReportStep and/or ReplayThrowError.