UFT Tutorial 6


UFT Class 6 (Object Repository Part-1)

What is Object Repository?


It is a storage place to store Test objects information.

Test Execution Process

Test/Test Script    Object Repository    AUT
Steps/Statements    Local or shared    -> Execution
                            Objects Info

Two types of Object Repository in UFT

a) Local Object Repository (Internal file)

UFT creates a Local Repository for every Action during Recording. Local Repository files
will be saved along with the Test.

User (Tester) Can edit(Add, Rename, Delete) Local objects.

b) Shared Object Repository (External file, .tsr)
---------------------------
User creates shared object repositories either by Adding objects or by Exporting local object.

Shared Object Repository files are external files User(Tester) has to create maintain these files

User can edit shared objects.

a) Add Objects:

Open the Dialog box / Window / Web page (AUT)

Select Resources menu -> Object Repository Manager-> Object menu-> Add objects
-> Show the Dialog box / Window / Web page (AUT)-> Select the Filter->Click OK-> Save the Repository with .tsr extension.

Select the Filter

i) Selected Object Only (UFT will store selected object only, no child objects)

ii) Default objects (All objects which are having functionality)

iii) All Objects (All objects including static objects)

iv) Selected Object types (Selected class of Objects only, but user can select one or more classes)
-----------------------------
b) By Exporting Local Objects:

Launch Local object Repository->File menu-> Export Local Objects->Enter File Name->Create

When to choose Add objects feature and When to choose Exporting Local Objects feature.

-> When there is a few objects available in a window or web page then Add objects feature.

-> When there are hundreds of objects but we want to store a few objects then Add objects.
--------------------------------------
Operations on Object Repository

a) Add Objects (Local, Shared)

i) Add Objects to Local

Resources menu-> Object Repository->Object-> Add Objects to local-> Show the object->OK

ii) Add Objects to Shared:

Resources menu-> Object Repository manager->File->Open->Browse path of the file
-> File menu->Enable Editing
->Object-> Add Objects->Show the object->OK-Save->Close OR manager.
------------------------------------------------
b) Rename Objects(Local, Shared)

i) Rename Local Objects:

Resources -> Object Repository->Select Object & Right click-> Rename->Close Object Repository

ii) Rename Shared objects:

Resources -> Object Repository Manager->File->Open->Browse path of the file
-> File menu->Enable Editing
->Select Object & Right click-> Rename->save->Close OR manager
-----------------------------------------------------------
c) Delete Objects (Local, Shared)

i) Delete Local Objects:

Resources -> Object Repository->Select Object & Right click-> Delete->Conform Deletion-> Close Object Repository

ii) Delete Shared objects:

Resources -> Object Repository Manager->File->Open->Browse path of the file
-> File menu->Enable Editing
->Select Object & Right click-> Delete->Conform Deletion->save->Close OR manager
----------------------------------------------
d) Export Local Objects

Resources -> Object Repository->File->Export Local objects->Browse path to store->Enter file name
->Create->Close Object Repository

e) Merge Repositories

Resources -> Object Repository Manager->Tools->Object Repository merge tool->Browse path of the primary file, Secondary file
-> OK->Close->Save the Repository-Close Object Repository merge tool->Close Object Repository Manager,

f) Associate Shared Object Repositories

Test

Action 1    Repository 1 and Repository 2

Action 2    Repository 2 and Repository 3

Navigation-

Resources->Associate Repositories-> Click Add sign->Browse path of the Repository-> select Action-> Associate

Why we need to Associate shared Repositories?

0 comments:

Post a Comment