Tuesday, 24 April 2012

What are the drawbacks of record and playback method in QTP? And what is the solution to overcome these drawbacks?

There are following reasons why record and playback method has lots of drawbacks:
  • If the objects in the application are dynamic, then record and playback is not useful. In such case objects will not be identified.
  • If you are recording large application then QTP needs to store more number of objects in object repository. QTP performance may decrease when the object repository becomes too large, due to the number of objects added.  As the object repository increases, more resources are required to recognize the objects, which may decrease performance.
  • Object descriptions redundancy: suppose application has 3 navigation buttons on each page say Cancel, next & back buttons and while you record it stores same object description for all pages you navigated while recording.
  • We cannot insert conditional and loop statements if it is only record and playback. You cannot enhance your script in record mode.

Descriptive programming is way to overcome the drawback of record and playback method.

DESCRIPTIVE PROGRAMMING BYPASS OBJECT REPOSITORY

Descriptive Programming is the way of instructing QTP to identify the objects without object repository. In other word, Programming (VBScript) is done without using the object repository is called descriptive programming. To do this we provide QTP the list of properties & values, that qtp can use to identify the object on which we want to perform the operation.

For example if you have unstable application i.e Properties might change or Name of the Object might change and so on. If these frequent changes are happening in an application then we will go for descriptive programming. 

E.G. 1: ("windowid:=2342143")

E.G. 2: Browser("creationtime:=2").Page("title:=Google Search").Link("text:=Codes").Click

BY - Mann Bhammar
         Test Analyst

No comments:

Post a Comment