Search here for all the info you want in this Blog

Showing posts with label recording. Show all posts
Showing posts with label recording. Show all posts

Descriptive Programming (DP) vs Object Repository (OR)

if you ask the difference between object repository and descriptive programming or advantages and disadvantages of both.

everybody will see it in their own view, both has its own advantages and disadvantages

 Object Repository:

    QTP identifies the test object properties which it learns while recording and stores the object properties in the object repository.QTP will use these stored properties while executing the recorded script.

Descriptive programming : this a script method where object properties are directly coded  instead of storing it object repository.
There are two types :
  
   * creating decription object using create.description()
   *You list the set of properties and values that describe the object directly in a     
       VBScript statement

 Advantages of DP over object repository:
 
 a) It is tedious to maintain the object repository, when the size increases.
 b) We have to cautious will using shared repository, if any changes made it will 
     affect  all the tests associated with it.
 c) OR will be time consuming to maintain.





Test Recording Process in QTP


Test Recording Process

It is a Process of Recording user operations on AUT (Application Under Test), what ever the operations we perform the QTP will record them.

During Recording QTP Creates steps in Keyword view, and generates them in a script in the Expert view. Simultaneously it reads the object identification information (object properties) adds Objects information into Object Repository.

 Recording Modes
QTP has 3 Recording Modes to generate Tests / Test Scripts

Normal Recording
Analog Recording:
Low Level Recording


i)  Normal Recording

It records User Mouse and Keyboard operations on AUT with respect to objects, but unable to record continuous mouse operations like Digital Signatures, graphs, paints etc.

During recording QTP generates VbScript statements in Test Pane, Simultaneously it stores objects information into object repository.

Navigation: Automation>Record
                          Or
           Select Record option on automation toolbar
                          Or
             Use short cut key (F3)

Steps for preparing a Test (through Recording):

1.Put AUT in base state
2.Select Record Option
3.It shows Record and Run Settings, Select type of Environment (Windows or Web)
4.Select Record Option

(It shows two Options :
1.Record and Run Test on any open window based applications
2.Record and Run only on)

If we select first option it records on any opened application on Desktop.
If we select Second option, it asks for the path of the AUT, After Providing the path it records only on that particular application.)

5.Click OK
6.Perform actions on AUT
7.Stop recording.
8.Save the Test

ii) Analog Recording:

It records the exact mouse and keyboard operations. We can use this mode for recording continuous mouse operations. It is not useful for recording normal operations why because it does not generate steps for each operation, generates total user actions in a Track File. The Track file is not editable.

Navigation:

1.Keep tool under recording mode
2.Automation >Analog Recording
OR
Use Short cut Key (Shift + ALT+F3)

Steps for preparing a Test (through Analog Recording):

1.Launch AUT (or we can launch AUT through QTP)
2.Select Record option
3.Automation>Analog Recording
4.Analog Recording Settings Dialog box opens

(In this Dialog box two options available.

1.Record relative to the screen
2.Record relative to the following window)

(If we select first option QTP records User operations with respect to Desktop co-ordinates.
If we select Second option, we have to show the window (AUT), after showing the Window it records with respect to that window co-ordinates.)

5.Select any one option in the dialog box and click Start Analog record.
6.It records User actions
7.Stop Recording


iii) Low Level Recording

It records some operations on Non-supported environments apart from Normal operations.

This mode records at the object level and records all run time objects as window or winobject Test objects.

Use Low Level Recording for recording in an environment not recognized by QTP.

Navigation:
1.Keep tool under recording mode
2.Automation >Low Level Recording

Steps for preparing a Test (through Low Level Recording):

1)Launch AUT (or we can launch AUT through QTP)
2)Select Record option
3)Automation> Low Level Recording
4)Perform options on AUT
5)Stop Recording
6)Save the Test