Documente Academic
Documente Profesional
Documente Cultură
com
Object Repository
Object Repository:
It is a storage place of QTP where we can store the objects information and it also
acts as interface between the test script and the AUT in order to identify the
objects during execution.
Object:
Software objects:
We call windows, WebPages, buttons, edit boxes, check boxes etc.. as software
objects.
Run time objects: The objects present in the AUT. Ex: Buttons, links, etc…
Note:
Test objects names vary from one environment to another.
Ex:
Run time objects Test objects in Test objects in VB Test objects in
windows Environment web Environment
Environment
buttons WinButton VBButton WebButton
Edit box WinEdit VBEdit WebEdit
Check box Wincheckbox Vbcheckbox Webcheckbox
Utility objects
They are QTP reserved objects used for testing and result reporting.
Ex:
1. SystemUtil for launching/closing the application.
2. Reporter for defining results.
User can create objects; those can be used for performing specific operations. Ex:
Creating objects in file system object class, adodb.connection class, dictionary object
class, excel. Application class etc.
Local Repository:
QTP creates a Local Repository for every action automatically during Recording.
That cannot be shared among tests.
Shared Repository:
User (Test Engineer) creates shared repository by adding objects. That can be
shared among number of tests.
Using this method user can perform modifications on objects easily.
a. Local Repository:
(If we select first option it stores Selected objects only, if we select second option it
stores all default objects, if we select third option it stores All objects including static
objects, if we select fourth option, we have to select object classes then it stores
that class objects, we can select more than one class also.)
Renaming objects
a. Local Repository:
Resources > object repository >select object and right click >choose rename option
>modify the name>release the mouse.>close repository
b. Shared Repository:
Deleting objects
a. Local Repository:
Resources > object repository >select object and right click >choose delete option
>confirm deletion>. >close repository
b. Shared Repository:
Merging Repositories
Note: After merging also, source repository files will be available, if we do not want
source files we can delete.
Note: This feature can be used for preparing tests before the AUT is ready.
Spying objects
For getting objects information, (Test objects names, property & Values) QTP is
providing a feature called Object Spy, using this we can get objects information.
View Options
Locate in Repository
This feature can be used for identifying objects from application to repository.
Navigation: View>Locate in repository >show the object>click Ok>it locates
specified object in the repository.
Highlight in Application
This feature can be used for identifying objects from repository to application.
Navigation: Select object in the repository >view>highlight in application>it
highlights specified objects in the application.
Navigation: File >export Test objects to XML Enter the file name and Save with xml
extension.
Navigation: File>import from XML >browse path of the XML file >it loads objects.
Note: The purpose of this feature is Editing objects information outside of the QTP
By
www.gcreddy.com