Developing Support for Recording

One way to add objects to the object repository and create tests in UFT One is by recording. The UFT One user starts a recording session, performs operations on the application, and then stops the recording. During the recording session, UFT One records all of the user's operations as steps in a test and adds all of the relevant objects to the object repository.

To support the UFT One recording capability, the Testing Agent must:

  • Implement the BeginRecording and EndRecording methods in the IRecordable interface, enabling UFT One to inform the Testing Agent when the UFT One user starts and stops a recording session.

  • Call the Record callback method that UFT One provides in the IRecorder interface to inform UFT One of every operation that needs to be recorded during the recording session.

  • Optionally, call the RecordLine callback method that UFT One provides in the IRecorder2 interface to add VBScript code to the test, in addition to steps recorded using the Record method.

  • Call the Suppress and UnSuppress methods in the IRecordSuppressor interface to suppress native UFT One event recording as appropriate to prevent unnecessary steps from being added to the test.

The following diagram shows the general sequence of methods that are called when recording a test. This illustrates the purpose of the methods that the Testing Agent must implement. For example, UFT One calls the methods BeginRecording and EndRecording from the IRecordable interface to inform the Testing Agent when a recording session is started or stopped by the UFT One user. During a recording session, when the Testing Agent decides that a user operation needs to be recorded as a step in the test, the Testing Agent calls the Record method to instruct UFT One to record a step:

For more information, see: