The document summarizes a QTP training session that covers object repositories, parameterization, and understanding results. It discusses the different types of objects that can be stored in an object repository, how to create and associate local and shared repositories, and how to parameterize tests using data tables and environment variables. It also briefly mentions using the results window to view test outcomes.
2. Agenda
Object Repository
Types of objects
Operations on Object repository
Parameterization
Understanding the results
3. Object Repository
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
4. Types of Objects
1. Run time objects
Present in AUT. Ex Buttons, links etc
2. Test objects
References of run time objects. Ex. WinEdit, WinButton etc.
3. Utility objects
QTP reserved objects used for testing & result reporting. Ex SystemUtil,
Reporter etc
4. Automation / User defined objects
To use for performing specific operations. Ex. File system, Exel, Adobe etc
5. Types of Repository
Local Repository (.MTR extension)
Shared Repository (.TSR extension)
6. Types of Repository Creating Shared
Repository
1) Creating a Shared Object Repository
1. Open a new test in QTP.
2. In the Object Repository Dialog Box , Click File > Export Local Objects
3. Repository files have an extension .tsr .Give a suitable name say testqtp" and save
4. The Shared Repository File is now created
2)Associating a Shared Object Repository
1. Next step is to associate the repository to your test, which enables you to use it
2. To associate repository with a test, Click Resources > Associate Repository
3. You can select the Repository to associate with Actions available in your test.
3) Editing a Shared Object Repository
1. You can use the Object Repository Manager to Edit a Share Repository.
2. Select Resources > Object Repository Manager .Open the Object Repository we created
testqtp
3. By Default , Repository is opened in Read-only mode. To enable editing click File > Enable
Editing
7. Parameterizing
Multiple sets of data
TYPES
Data Table (Global & Action Specific)
Environment variables
Environment.Value("Fname")= "Robert"
Environment.Value("Lname")= "Williams
Browser(x").Page("title:=x").WebEdit(x").Set Environment.Value("Fname")
OR
Dim strTestDir
strTestDir=environment.Value(TestDir) '
msgbox strTestDir
Random Number
RandomNumber(1,99)