Object Repository in UFT

Object Repository in UFT

Object Repository:

It is a storage place to store Test Objects information

2 types of Object Repository in UFT

a) Local object Repository
UFT creates a Local repository for every Action during Recording, UFT only maintains Local repository files

Local repository files saved along with the Test.

User (Tester) can edit Local objects

b) Shared object Repository

User creates a shared object Repository either by Adding objects or by exporting Local objects

User can edit Shared objects

These can be shared with n number of Tests (Action)

Shared object Repository file is external file, extension is .tsr
Operations on Object Repository

1) Add objects (Local, Shared Repository)

2) Rename Objects (Local, Shared objects)

3) Delete objects (Local, Shared objects)

4) Export Local objects

5) Merge Repositories

6) Associate Shared object Repositories

    Action1 Rep1
    Action2    Rep1

7) Load Shared object Repositories during Execution

RepositoriesCollection.Add "C:\Users\gcreddy\Desktop\Login.tsr"
SystemUtil.Run "C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set "abcd"
Dialog("Login").WinEdit("Password:").SetSecure "5451a13daf4d44c4b3c2f3867440d5b87062341a"

RepositoriesCollection.Add "C:\Users\gcreddy\Desktop\OpenOrder.tsr"
For i = 1 To 10 Step 1
Window("Flight Reservation").Activate
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").Dialog("Open Order").Activate
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set i
Wait 2
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click

8) Map Objects in between OR and AUT

    i) Highlight in Application (From OR to AUT)
    ii) Locate in Repository (From AUT to OR)

9) Export Test Objects to XML / Import from XML

10) Define New Test Objects
Keyword driven methodology
Keyword driven Testing

In this approach keywords can be used to design and execute tests.

Keyword driven methodology
Generate Tests manually using Keywords

Steps for Keyword driven methodology

    i) Create shared Repositories
    ii) Associate shared Repositories
       Load shared Repositories during execution
    iii) Generate Steps or Statements
        using Editor view
        using Keyword view
        using Step Generator
        by Drag and Drop objects from OR to Editor


Post a Comment