Tuesday, 2 September 2014

Understanding QTP Record and Run Settings

Record and Playback

Recording a test corresponds to recording the user actions of the application under test so that UFT automatically generates the scripts that can be played back. Record and Playback can give us the first impression if the tool can support the technology or NOT if the initial settings are done correctly.

Record and Run Settings Dialog

When QTP is launched and we choose to record a new test, the ‘record and run settings’ dialog opens up.  Alternately a user can choose to access this window by choosing “Automation->Record and Run Settings” option from the menu. So far in our examples we have just continued with its default settings but now we will explore it further. The following is the how this dialog looks:

Click Record Button, the Internet Explorer opens automatically with the webaddress http://easycalculation.com/ as per the settings. Click "Numbers" link under "Algebra" and key in a number and hit "calculate". Upon completion of the action click "Stop" button in the record panel. You will notice that the script is generated as shown below:



Now playback the script by clicking on the playback button. The Script replays and result is displayed.


The result window is opened by default which exactly shows the timestamp of execution, pass and failed steps.


Significance of Record and Playback:

  1. It is used as the preliminary investigation method to verify if UFT can support the technology/application.
  2. Used to create a test a basic functionality of an application or feature that does not require long-term maintenance.
  3. It can be used for recording both mouse movements and keyboard inputs.

Modes of Recording:

  1. Normal Recording: This is the default Recording mode that records the objects and the operations performed on the application under test.
  2. Analog Recording: This records not only the keyboard actions but also the mouse movements relative to the screen or the application window.
  3. Low-Level Recording: This records the exact co-ordinates of the objects independent of the fact whether UFT recognizes the object or NOT. It just records the co-ordinates, hence does NOT record mouse movements.
  4. Insight Recording: UFT records operation based on its appearance and NOT based on its native properties.

No comments:

Post a Comment