Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Descriptive Programming

Descriptive Programming

Ratings: (0)|Views: 413|Likes:
Published by G.C.Reddy

More info:

Published by: G.C.Reddy on Feb 13, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





For QTP Related Documents visit: www.gcreddy.com
Descriptive Programming in QTP
For QTP Documents visit:
For Manual Testing Documents visit:
For Manual Testing documents visit: www.gcreddy.net
For QTP Related Documents visit: www.gcreddy.comWhat is Descriptive Programming?
Providing Objects information directly into the Test Script, instead of storing objectsinformation in the Object Repository.Descriptive Programming is a method of performing operation on the object which is notthere in Object Repository. We can also use programmatic descriptions to perform thesame operation on several objects with certain identical properties, or to perform anoperation on an object whose properties match a description that we determinedynamically during the run session.Tests using Descriptive programming are faster than Tests using Object Repository
Benefits of Descriptive Programming
If the AUT (Application Under Test) is having Dynamic Objects, then it is better to usedescriptive programming. Incase of object repository, it is Difficult to handle dynamicObjects.When we have more objects to perform operations, in performance point of viewdescriptive programming is better than object repository method. If we use objectrepository for generating huge tests, then QTP performance will be decreased.Descriptive Programming is useful if the AUT is having objects that are adding in the RunTime. We can’t add Objects to Object Repository in run time.If we need to start Test Automation process before the AUT is readyDescriptive Programming is useful, if the AUT is having similar type of objects or similarname objects. Incase of Object Repository, It will create multiple objects with samedescription unnecessarily.Shared Object Repository is not changeable by multiple persons at a time.Maintenance becomes harder if all the team members have created their own objectrepositories. In this situation Descriptive Programming is very flexible.Tests using Descriptive Programming can be executed in any version of QTP without anychanges.Code Portability: Just code is enough to run Tests. We can copy and paste in other scriptsfor any other required requirement.Reusing of Properties: We can assign properties to a global variable and reuse it for sametype of objects.Plug & Play: Any time Tests will be in ready to run state. No need to worry about anyother settings or files.Just Maintenance of variables: We can store the object properties in the form of variablesin a txt / vbs file which will be placed in central location. In this case we just need tomaintain that file.
For Manual Testing documents visit: www.gcreddy.net
For QTP Related Documents visit: www.gcreddy.comTypes of Programmatic Descriptions
(Descriptive Programming)
1) Static:
- We enter the set of properties and values that describe the object directly ina VBScript statement.a) Direct specification of description in scriptBrowser(“micclass:=Browser”).Page(micclass:=page”).Link(“name:=gcreddy”).Clickb) Assigning description to the variables and use that variables in scriptg_MainBrowser=“micclass:=Browser” g_MainPage=micclass:=Page” g_Lnk_Login=name:=Login” Browser(g_MainBrowser).Page(g_MainPage).Link(g_Lnk_Login).Click
2. Dynamic:
- We add a collection of properties and values to a Description object, andthen enter the Description object name in the statement.Set oBrowser = Description.createoBrowser (“micclass”).value=”Browser” oBrowser (“name”).value= “Google” Set oPage = Description.createoPage (“micclass”).value=”Page” oPage (“name”).value= “Google” Set oLink = Description.createoLink (“name”).value= “Login” oLink (“index”).value= 1Browser(oBrowser).Page(oPage).Link(oLink).clickUsing the Static type to enter programmatic descriptions directly into your statementsmay be easier for basic object description needs. However, in most cases, using theDynamic type provides more power, efficiency, and flexibility.Handling Runtime added objects / Dynamic Objects / Same Description ObjectsDynamic objects: Property values are getting changed regularly.Same Description Objects: Property values are same for multiple objects.Runtime Added Object:Object is not there in recording time but it might be add inruntime.Ex: Always the job links in Naukri and Monster sites will get update.Child object method is very useful to get control on Runtime added objects or dynamicobjects or same description objects which are there application.
For Manual Testing documents visit: www.gcreddy.net

Activity (29)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
umashankar66 liked this
Sai Krishna liked this
pallavija23 liked this
Sai Krishna liked this
kamakshyi liked this
Bharat Singh liked this
sekha02 liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->