Enhancing Your UFT Testing Agent > Developing Support for Recording > Recording Steps

Recording Test Object Method Steps

While a UFT recording session is active, the Testing Agent must call the Record callback method in the IRecorder interface for every operation that takes place on the application and needs to be recorded as a step in the test. Record steps for operations that are significant to the behavior of the application being tested and reflect business processes that a real user would perform. Do not record steps for low-level events that occur on the application, such as mouseover and scroll down.

For example, if your testing environment XML defines a complex operation that requires a few clicks and some keystrokes, implement the Testing Agent to call the Record method only for the full operation after it is completed and not for every click and key press. Calling the Record method instructs UFT to record a step and provides the test object, the test object method, and the arguments to include in the step.

The Testing Agent must call the Record method before allowing the application to react to the performed operation. This enables UFT to collect information regarding the state of the application before the step is carried out. UFT can then use this information when running the test.

In addition, to prevent the state of the application from changing while UFT collects information from the application, the Testing Agent must block the application until the Record method returns. While waiting for the Record method to return, the Testing Agent must be available to perform any methods that UFT calls.