Object Repository

:
Which is defined as a Storage place where one can store the Objects information and it also act as an Interface between the Test Script and AUT in order to Identify the Object during the execution. Objects ……….. properties ………. Object Repository ………… ………….. ……Script… …………. …………. Test

AUT

 Using the value of properties in Object Repository QTP will Identify the object in AUT , Hence, we can’t change the value of property of that object.  Usually we should not change the value of property of an object but when the value of Original object’s property is changed by customer then we can change its property value.  Rename for an object is required to easily understandable and remembrance  We can identify an object with minimum number of properties, so, execution speed will be fast. If those minimum properties are not sufficient to find an object in AUT then we go for some more properties to identify that object.  Highlight button is used for High Light the corresponding object in AUT. Some times QTP will name objects to un-meaningful names , by using this button we can easily find that object in AUT and re-name to a meaning full names which we can easily remember. OR Whenever a testing engineer is not understanding any object, then he will use HighLight button , so that it will make the corresponding object is highlighted in AUT. Thereby, one can easily understand which object is this. Types of Object Repository 1. Per-Action Repository 2. Shared Repository

Per-Action Repository :- If at all this type of repository is selected , for every action a Separate individual repository is created automatically and managed by QTP. • For sample test we go for per-action repository • Per-action repository can’t be Re-usable • Space required for storage is Less • Execution speed is fast Shared Repository :- If at all this type of repository is selected ,then one need to create the shared repository manually and associate it to the corresponding test manually. • For long run we go for shared repository even though we need to create manully. • Shared repository can be re-usable • Space required for storage is more • Execution speed is slow • Easily maintenance

Object Identification :
Object Identification concept is based on 4-types of properties and an Ordinal Identifier. Those 4-Types of properties :1. Mandatory Properties (MP) Normal Brain 2. Assistive Properties (AP) and Ordinal Identifier 3. Base Filter Properties (BFP) Smart Brain => stores in secret place 4. Optional Filter Properties (OFP) How QTP will Learns the object’s properties ? With Normal Brain only With Smart Brain (Normal + smart brain) BFP I OFP AP ………………. ……………… OI ………………. ……………… AP ………………. ……………… OI ………………. ……………… => stores in Object Repository

MP

I

M

II

II

III

III

How QTP will Identify the object’s properties ? With Normal Brain only All All AP …………… ………….. I A

With Smart Brain (Normal + smart brain) I

All MP + May be/All AP Fresh OI ………………. ………………

All BFP

III

OI ………………. ………………

II

II

OFP ………………. ………………

How QTP will Learns the object’s properties ? With Normal Brain only First of all QTP will Learn all the list of MP then it will STOP and think whether these properties are sufficient to Identify the object Uniquely. * If it feels satisfy then it will STOP Learning, other wise Learn the 1st AP, STOP thinks whether all these properties are sufficient to Identify the object Uniquely. If it feels satisfy then it will STOP Learning, other wise Learn the 2nd AP, STOP thinks whether all these properties are sufficient to Identify the object Uniquely. If it feels satisfy then it will STOP Learning, other wise Learn the 3rd AP, STOP thinks whether all these properties are sufficient to Identify the object Uniquely. ….. It will continue the above process till it feels Satisfied or Up to the End of AP list. At the end of AP list also if it feels not satisfied the Finally it will Learn the Ordinal Identifier and STOP learning. With Smart Brain (Normal + smart brain) QTP will Learn all the MP at time and along with it will also Learn the BFP and OFP completely and Stores them secretly not in the Object Repository. * Then remaining procedure is as Same as Above.

How QTP will Identify the object’s properties ? With Normal Brain only While Identifying object without smart brain is also same as in case of Smart brain presence. First of all QTP will use all the properties presented in the Object Repository Except the Ordinal Identifier and try to identify the object. If it fails, it will check whether the Ordinal Identifier is available or NOT. If it is available QTP will identify the Object Roughly or other wise STOPs. With Smart Brain (Normal + smart brain) First of All QTP will use all the Properties (All MP + May be/All AP) presented in the Object Repository except Ordinal Identifier and try to Identify the object. If at all it fails to identify the object, then it will FORGET all these properties and enter into the secret place. Then considers all the BFP at a time and try to identify the object by matching these properties with all the objects in the AUT, then it will form a list of all the objects that are matched with these properties and check whether the list is containing only one object or more than one object. If the list is containing more than one object , then it will consider the 1st OFP and try to match with all the objects presented in the list and then forms a new list of objects that matched with this property. And checks whether the list containing only one object or more than one objects. If the list is containing more than one object it repeat the above process with 2nd OFP. Like this it will repeat the same process till the list is Contain only one Object or Up to the end of OFP list. At the end of OFP list also if the list is containing more than one object then finally it will check whether the Ordinal Identifier is available in the Object Repository or NOT. If it is available , it will identify the object ROUGHLY or otherwise STOPs / Hands up .

Ordinal Identifier
* Generally we should not encourage the Ordinal Identifier but when the application is Stable then we may use it. * Once the application is stable then only we go for Automation, till such time we do only manual testing. There are 3 type of Ordinal Identifiers 1. Location 2. Index 3. Creation Time 1. Location :- If at all the location is selected as an OI then the QTP will generate the Numbers from 0,1,2,3……based on the Sequence of the objects located in the Application. 2. Index :If at all the index is selected as an OI then the QTP will generated the Numbers from 0,1,2,3…. based on the Sequence of the Programs of the objects.

3. Creation Time ( for web pages only):If at all the creation time is selected as an OI then the QTP will generate the Numbers from 0,1,2,3….. based on the Loading time of the web Page.

Smart Identification Mechanism
Whenever the QTP Fails to identify the object with the help of properties presented in the Object Repository, then the Special mechanism provided by QTP to identify the same object smartly with some other properties is called Smart Identification Mechanism.

Object Spy
It is a handy / useful feature provided by QTP which shows the complete object information like List of Properties , List of Methods, Syntaxes of Methods and Description of Methods then and there and Immediately on the spot of both Test Object as well as Run Time Objects.

Runtime Object :- Run time object is he Original objects presented in the AUT . Test Object :- Test object is the Reference object for the Runtime object created by QTP and used by QTP to identify the Runtime object during the Execution.

-: The End :Pls. leave your feed back (both +ve and –ve ) at kanakadria@yahoo.co.in

Sign up to vote on this title
UsefulNot useful