UFT Object Repository


UFT Object Repository
It is a storage place for storing Test Objects information.

UFT has 2 types of Object Repository:
i) Local Object Repository
>UFT creates a local repository for every action during Recording.

>User (Tester) can edit local objects.

> UFT maintains Local repositories along with the Test script

> User also can create Local object Repositories.

> Local objects can be exported as Shared objects.
-----------------------------------------------------
ii) Shared Object Repository (.tsr)

User creates shared object repositories either by Adding objects or by exporting local objects.

In two ways Shared object Repositories can be created:

a) By Add Objects

b) By export Local objects
Shared object repository file is external file, user need to maintain shared repositories.

User can edit shared objects.

Navigation to create Shared object Repository:
Resources menu -> Object Repository Manager
-> Object menu-> Add objects (Or use Tool bar option)
-> Show the Dialog box/window/web page -> OK
-> Select required option-> click OK -Save->
browse path to store-> enter file name and Save
-> Close Object Repository Manager
-----------------------------------------
Options:
----------
o Selected Object only - Stores selected object only, no child objects.

o Default object types -stores all default objects, which are having functionality

o All object types - stores all objects including static objects (which are not having functionality)

o Selected objects types (user has to select Object class/s, then it will store objects from those classes)
---------------------------------------------------
Operations on Object Repository:
 

i) Add objects

a) Add object to Local Repository:
Resources menu -> Object Repository -> Object -> Add objects to Local
-> Show the object -> click OK.

b) Add object to Shared Repository:
Resources menu-> Object Repository manager -> File -> Open
-> Browser path of the file -> File menu-> Enable editing -> Object
-> Add objects-> Show the object -> OK -> Save -> Close Object Repository manager
-------------------------------------------
ii) Rename Objects
a) Rename Local Objects
Resources menu -> Object Repository ->Select the object and right click
-> Rename -> rename the value-> Close Object Repository

b) Rename Shared objects
Resources menu-> Object Repository manager -> File -> Open
-> Browser path of the file -> File menu-> Enable editing
->Select the object and right click
-> Rename -> rename the value-> Save -> Close Object Repository manager
---------------------------------------------
iii) Delete Objects

a) Delete Local Object/s:Resources menu -> Object Repository ->Select the object and right click
-> Delete -> conform the Deletion-> Close Object Repository

b) Delete Shared objects:
Resources menu-> Object Repository manager -> File -> Open
-> Browser path of the file -> File menu-> Enable editing
->Select the object and right click
-> Delete -> conform the Deletion-> Save -> Close Object Repository Manager
-------------------------------------------
iv) Export Local objects

Resources menu -> Object Repository -> File menu
-> Export Local objects -> Browser path to store-> Enter file name and create
-> Close Object Repository

When to choose Add objects feature:
> If we have small amount objects and want to store maximum objects

When to choose Export Local objects feature:
> If we have hundreds of objects but want to store a few objects then record the navigation and export local objects.
------------------------------------------
v) Merge Repositories
Resources menu-> Object Repository manager -> Tools menu
-> Object Repository merge Tool
-> Browser path of the primary file
->Browser path of the secondary file -> Click OK - Close Statistics dialog
-> Save the File -> Close Object Repository merge Tool
-> Close Object Repository manager
------------------------------------------------
vi) Associate shared object Repositories
Why we need to associate shared repository files with Actions?

In order to create and execute Tests manually we associate Object Repository manager.

UFT supports Many to many association

Action 1 Repository 1, 2

Action 2 Repository 2, 3

Navigation:
--------------
Resources menu-> associate Repositories -> Click + sign (Add Repository)
-> Browse path of the Repository
-> Select Action and Associate
--------------------------------------------
vii) Load Shared Repositories during execution.
Syntax:

RepositoriesCollection.Add "Path of the shared object Repository"

Ex:

RepositoriesCollection.Add "C:\Users\gcreddy\Desktop\Login.tsr"
-----------------------------------------------
viii) Map objects in between OR and AUT.

Using view options in Object Repository we can map objects in between OR and AUT.

i) Highlight in Application (Works from OR to AUT)

ii) Locate in Repository (Works from AUT to OR)
-------------------------------------------------
ix) Export Test objects to XML/Import Test objects from XML
Using XML format, we can edit Test objects without UFT Tool.

----------------------------------
x) Define New Test Objects
Using this "Define New Test Objects", we can create test scripts even though Application is not ready, but it is not recommendable.

How to define new test objects:

By getting Objects information from developers
----------------------------------------------------

0 comments:

Post a Comment