Professional Documents
Culture Documents
1.Manual Testing:
It is a way of testing in which one will perform all the phases of software
testing life cycle like Test planning, Test development, Test execution, Result analysis, Bug
tracking, and Reporting are accomplished manually, successfully with human efforts.
Time consuming
Tiredness / Bore
2.Automation Testing:
Automation testing is a process in which all the drawbacks of manual testing
are addressed properly and provides speed and accuracy to the existing testing process.
Lack of experts
Automated Tool:
Automated tool is an assistant of a test engineer, which works based on the
instructions and information given by a test engineer.
-1-
Functional Tool
Mercury Interactive incorporation
Scripting Language:
VB- Script
Version:
#5.5,#6.5,#7.0,#7.6,#8.0,#8.2(2005),#9.0,#9.1,#9.2,#9.5,#10.0,#11.0
EMP
Anatomy of QTP:
E name
E age
E Sal
E Desig
Submit
-2-
VbWindow("VbWindow").VbEdit("VbEdit").Set "10"
VbWindow("VbWindow").VbEdit("VbEdit_2").Set "20"
VbWindow("VbWindow").VbButton("ADD").Click
VbWindow("VbWindow").VbButton("SUB").Click
VbWindow("VbWindow").VbButton("MUL").Click
VbWindow("VbWindow").VbButton("DIV").Click
VbWindow("VbWindow").VbButton("CLEAR").Click
Adding Manager:
Adding manager is a feature provided by QTP which is used for showing
all the list of addings while opening the QTP so that the user can select the desired
addings and then enter in to the QTP, Before the user access the QTP the adding
manager will make the QTP compatible with all the selected environments.
-3-
1.Test Pane:
Test pane is an area provided by QTP, which is used for developing,
viewing, and modifying the test screen. It represents the test scripts in two views
(a). Expert view
(b). Key word view
(a). Expert view: It represents the script in VB script format
(b). Keyword view: Keyword view represents the script using a graphical user interface
(GUI) which is further divided in to four parts.
Item
Operation Value
Documentation
2.Active Screen:
Active screen is an area provided by QTP, which holds the snapshots of each and
every script statements and used for the following.
3.Data-Table:
The date table is originally called as formula1 sheet developed by third party and
integrated with QTP.
-4-
Features:
ii.
5.Tool- Options:
All the options available in the menu bar, file tool bar and testing tool bar are
known as tool-options.
-5-
Navigation:
Click on OK
Recording Modes:
There are there types of recording mode
(a). Context sensitive recording mode or Normal recording mode
(b). Analog Recording Mode
-6-
Navigation:
OBJECT REPOSITORY
Object Repository:
Object repository is a storage place where one can store the objects
information and it also acts as interface between
-7-
n the test script and the AUT(application under test) in order to identify the original
objects during execution
Advantages:
Easy to maintain
Re-usability
Click on export
-8-
Click on ok
Click on OK
Right click on it
Right click on it
-9-
YES
Click on OK
Highlight:
Highlight button is used for highlighting the corresponding object in the
AUT so that a test engineer can clearly understand which objects information is that.
OBJECT IDENTIFICATION
Object identification:
Object identification is based on four types of properties and an ordinal
identifier
Types of properties:
1. Mandatory Properties
2. Assistive properties
3. Base-Filter Properties
4. Optional Filter properties
A test engineer can specify the list of mandatory properties, List of assistive properties,
List of base filter properties, list of ordinal filter properties and an ordinal identifier.
QTP learns the information in the following in case only normal brain:
First of all the QTP will learn all the mandatory properties at a time and then think
weather these properties are sufficient to identify the object uniquely. If it feels
sufficient then it will stop learning otherwise it will learn the first assistive property and
- 10 -
once again stops and thinks weather these properties are sufficient to identify the
object uniquely. If it feels sufficient then it stops learning otherwise learns the second
assistive property and checks weather these properties are sufficient or not. This
process continuous till the QTP satisfies or up to the end of the assistive properties list.
At the end of the assistive properties list also if it feels not satisfied then it will finally
learn the ordinal identifier and stops learning.
QTP learns the information in the following way in case of smart brain also:
While learning the mandatory properties along with them it will learn the
base filter properties, optional filter properties and stores them in the secret place.
It considers the mandatory properties only and check weather these
properties are sufficient to identify the object uniquely. and repeats the above process.
Note: In the above learning process except base filter properties and optional filter
properties all the remaining information learnt will be stored in the object repository.
QTP will use the information in the following way to identify the object during
execution:
First of all QTP will use all the properties present in the object repository
except ordinal identifier and try to identify the object. If at all the object is not identified
then it will forget about all these properties and freshly enters in to the secret place.
QTP will consider all the base filter properties and try to identify the
object and forms a list of all the objects that are matched with the base filter properties.
If the list contains only one object then that is the object otherwise it will take the
support of first optional filter property and try to match with all the object present in
the list and forms a new list of all the objects that are matched with that property and
then check weather the list is containing one object or more that one object. If the list is
containing more than one object then it will consider the second optional filter property
and repeats the whole procedure till the list contains on object or up to the end of the
optional properties list.
At the end of the optional filter properties list also if the list is containing more than one
object then it will finally go to the object repository and check weather the ordinal
identifier is available or not. If at all the ordinal identifier is available it will identify the
object roughly using that otherwise HANDSUP.
- 11 -
Ordinal Identifiers:
There are three types of ordinal identifiers
1.Location
2.Index
3.Creation time
1.Location:
If at all the location is selected, as an ordinal identifier then the QTP will
generate a sequence of numbers from 0,1,2,3 based on the sequence of the objects
located in AUT.
2.Index:
If at all the index is selected as an ordinal identifier than the QTP will
generate the numbers from 0,1,2,3. Based ob the sequence of the programs of the
objects.
Smart Identification:
When ever the QTP is unable to identify the objects with the help of the
properties present in the object repository then the special mechanism provided by QTP
to identify the object smartly with some other properties is known as smart
identification.
- 12 -
Smart identification
Specify the desired list of base filter properties and optional filter
properties with the help of add/remove buttons
Click on OK
Object Spy:
Object spy is a handy feature provided by QTP which is used for showing
the complete objects information like list of properties and their values, list of
methodology, syntax for methodology and description of methods then and there on the
spot immediately of both test objects as well as runtime objects.
Types Of Objects:
There are two types of objects 1.Run time objects
2.Test objects
2.Test Objects:
Test objects are the reference objects created by the QTP for run time
objects, stored in object repository and used by the QTP for the original objects
- 13 -
Test planning
II.
III.
IV.
V.
VI.
I. Test Planning:
In this phase the automation test lead will do the following
1. Under standing the requirements
2. Identifying all the areas to be automated
3. Analyzing both the negative and positive flow of the
application
- 14 -
1.Check Point:
Checkpoint is defined as validation pointer test point which checks the
objects state or bitmap state or data state during execution at any point of time
i.
Pre-execution Phase:
It captures the expected value
Generates the corresponding test script statement
- 15 -
Types Of Checkpoints:
a. Standard checkpoints
b. Bitmap checkpoint
c. Text checkpoint
d. Text area checkpoint
e. Data base checkpoint
f.
XML checkpoint
g. Page checkpoint
For Web
Checkpoints
Hidden Checkpoints
h. Table checkpoint
i.
Image checkpoint
j.
Accessibility checkpoint
a. Standard Checkpoints:
i.
Through application
ii.
Go to checkpoint
Click on OK
- 16 -
Click on OK
Stop Recording
Click on OK
Click on OK
Through application
ii.
Click on OK
- 17 -
If at all one need select a part of bitmap then select it using the
select area button
If at all one need save only the selected part then select the check
box save only selected area
Click on OK
Click on OK
IF alt all one need to save only the selected part select the check
box save only selected area
Click on OK
Through application
ii.
Through Active
- 18 -
Match case
Exact match
Ignore space
Click on OK
Match case
Exact match
Ignore space
Text not displayed
Click on ok
- 19 -
Match case
Exact match
Ignore space
Click on OK
Stop Recording
Navigation:
Go to check point
Click on meet
Click on create
Click on new
Slick on next
Click on finish
Click on select
Click on ok
Click on ok
Click on ok
Click on finish
- 20 -
Click on ok
Navigation:
Click on OK
Click on OK
Navigation:
Go to active screen
Click on ok
- 21 -
Click on ok
Navigation:
Keep the cursor on the desired statement, so that the corresponding page will be
displayed in the active screen
Click on ok
Select on ok
Click on ok
Navigation:
Keep the cursor on the desired statement sot heat the corresponding page is
displayed in the active screen
- 22 -
Click on ok
2.Synchroniztion:
Synchronization is a process of matching the speeds of both the tool and the application
in order to keep them in sync with each other to obtain proper testing results
Here the main concept is making the tool to wait till the application finishes its work it
can be done in three ways
1. Inserting the synchronization point
2. Increasing the default time
3. Inserting the wait statement
Navigation for inserting the synchronization point:
Click on ok
Click on ok
Stop recording
In order to avoid above navigation one can directly type the statement in the desired
location with the following syntax:
SYNTAX: Object hierarchy. Wait property Property name property value, extra time in
milliseconds
Example: Window (flight reservation).win button(delete order).wait
propertyenabled,true,17000
- 23 -
Data Driven Testing: Data driven testing is a concept introduced in the automation in order to implement retesting
Parameterization:
Parameterization is a process of replacing the constant values with parameters or
variables in order to increase the scope of the test. Parameterize can be done in three ways
1.Through data driver wizard
2.Through key word view
3.Manually
Click on parameterize
Click on next
- 24 -
Click on ok
Click on next
Click on finish
Finally click on ok
Click on ok
To avoid the above navigation one can directly type manually as follows:
A= datatable(v1,1)
Vbwindow(form1).vbedit(val1).set A
Vbwindow (form1).vbedit(val2).set datatable(v2,1)
Vbwindow(form1).vbbutton(Add).Click
Vbwindow(form1).vbedit(res).check checkpoint(RES)
Click on ok
Out put value is a feature provided by QTP, which is used for capturing a value from an
application or from a database or from a XML file and stores it under specified column in the runtime
data table
Operational overview of out put value: The out put value feature works in two phases
1. Pre-Execution Phase
2. While Execution Phase
1.Pre-Execution phase:
It will capture the field name from which it need to capture the value
It will generate the corresponding script
2.While-Execution phase:
Captures the actual value from the field
Stores it under a specified column in the run time data table
1.Standard Out Put Value: - It is used for capturing property value of a standard GUI object
2.Text Out Put Value: - It is used for capturing the text present on a specified object
3.Text-Area Out Put Value: - It is used for capturing the Text present in a specified area
4.Data Base Out Put Value: - It is used for capturing a value from the database
5.XML Out put Value: - It is used for capturing a value from the XML file
- 26 -
Click on OK
Click on modify
Click on Ok
Stop recording
Click on ok
Click on modify
Click on ok
5.Inserting the transaction points for measuring the transaction: It is a concept introduced in QTP which is used for calculating the time taken by an
application to perform a specific task or the execution time of a block of statement
To do the same QTP has provided two options
1.Start transaction
2.End transaction
- 27 -
Click on ok
To avoid the above navigation one can directly type the following statements manually in
the desired location
Services.start transaction transaction name
-------------------------------------------------------------------------------------------------------Services.end transaction transaction name
- 28 -
Status:
Pass
Fail
Done
Warning
0
1
2
3
1.Step into:
Step into is used for executing a single statement then it will step in to the function or
action and stops the execution.
2.Step Out:
Step out is used for executing all the remaining statements from the position of pointer
in the function of the action and comes out of the function or action and stops execution
3.Step Over:
Step over is used for executing the single statement if that statement is a function call
or action call then it will execute all the statements in side the function or action once and stops the
execution
Break Point:
- 29 -
Break point is the feature provided by QTP, which is used for breaking the execution
temporarily
Navigation:
Example
Function my func( )
Msg box Hai
Msg box hellow
Msg box How r u
End function
My func
Msg box bye
My func
Msg boxsee u
My func
Msg welcome
Msg box a
Msg box b
Msg box a
- 30 -
- 31 -
ADVANCED CONCEPTS
Regular Expressions: When ever the QTP is unable to identify the objects due to the regular changes in the
objects properties values dynamically during the execution then to overcome this problem one need to
replace the corresponding property value in the object repository with a suitable regular expression
Navigation:
Click on ok
Click on ok
Executing a group of script files at a time is known as batch execution. To do the same
QTP has provided a special tool by name test batch runner
Before using the test batch runner one need to do the following settings in QTP
Select the check box allow other mercury products to run tests
and components
Click on ok
Once the test batch runner is opened add all the desired script
files and save it as a batch file with .mtb extension
Recovery Scenarios:
During the execution QTP may face some problematic situation where in it needs to
recover by itself and continue the execution. To do the same a test engineer would have defined a
solution well in advance and made it available to the currant test before starting the execution.
QTP may face four types of problematic situations
1.Problems related to pop-up window
2.Problems related to object state
3.Problems related to test execution
4.Problems related to application crash
To define the solution for the above problems QTP has provided four trigger events
- 33 -
1.Pop up window
2.Object state
3.Test run error
4.Application crash
Click on next
Click on next
Clixk on next
Click on ok
Click on next
Click on next
Click on next
Click on next
Click on next
Click on next
- 34 -
Click on finish
Click on save
Browse the desired location and save the file by specifying a file
name with .QRS extension
Click on close
Environment Variables:
The variables that may be varied in different environments and need to be used
in the multiple scripts, should not be directly used in the scripts. They need to be declare separately in
an environment file that file need to be associated to the test and then the variables in that file need to
be used in those test so that when ever the values need to be updated in different environments one
can update them very easily in the environment
So all the tests using those variables will be automatically updated such kind of
variables separately declared in the environment file are known as environment variables
There are two types of environment variables
1.Built in variables
2.User defined variables
1.Built in variables:
These variables will be by default available with all the tests so that on can
directly use them in any test with the following syntax
var = environment.value(05)
Msg box var
- 35 -
Click on new
Click on ok
Click on export
Click on save
To avoid the above navigation one can directly develop the XML file as follows
<environment>
<variable>
<name> flight path </name>
<value>d:\program files\mercury </value>
</variable>
<variable>
<name> b </name>
<value>203</value>
</variable>
</environment>
- 36 -
Select the check box load variables and value from ecternal files
In order to avoid the above navigation one can directly type the following script
statement in the starting of the script
Virtual object configuration is a process of making the QTP t treat a specified area or
an user defined object as a specific object
Navigation:
Go to virtual objects
Click on next
Click on next
Mark the area in the application with the help of mark object button
Click on next
Parent only
Click on next
Click on finish
- 37 -
Once a virtual object is created it will be available to all the tests unless until we delete it.
Framework:
Framework is a generic work (outline work) or a set of guidelines designed by an expert
to perform a task in an effective, efficient and optimized way
1.Linear Framework
2.Modular Framework:
Actions
ACTIONS: Action is a set of script statements used for performing a specific task
- 38 -
Types of Actions:
There are three types of actions
1.Normal actions
2.Re-usable actions
3.External actions
Note: External actions are not editable .The re-usable actions called in another test are known as
external actions
Operations On Actions:
Navigation for inserting a new action:
Click on ok
Nested
Click on ok
- 39 -
Click on ok
Click on ok
Click on ok
Crate the required test data file and save them in the
corresponding folders
Create the required shared repository files and save them in the
corresponding folder
- 40 -
Open the main test and associate all the required files to each
Example:
CaseL2
Openord( )
Logout( )
Case L3
Login( )
Logout( )
End select
Specify the desired key words under the corresponding column in the data table
and save the test in the corresponding folder
When ever required open the test and execute it and analyze the result
- 41 -
Methods
First method Capture bitmap:
It is used for capturing a snap shot of an object or an window during executin
and stores it in the desired location
Wait property:
Wait property is used for making the tool to wait based on the object properties value
Syntax: object hierarchy.wait property property name, property value, extra time in mille seconds
Wait: it is used for making the tool to wait till the specified time is elapsed.
Syntax: Wait Time in seconds
- 42 -
3.Set Method: - Set method is used for setting a value in to an edit box or selecting or deselecting
acheck box or selecting a radio button
Syntax:
Object hirerearchy.setvalue
Object hierarchy of check box.set on/off
Object hierarchy of radiobutton.set
Case study-1:
Develop the script customer id, custname, currant age, cust phone number and clicking on
submit button
Cust
Cust Id:
Cust Name:
Cust Age:
Cust Ph no:
Submit
- 43 -
Vbwindow(cust).vbedit(cust).set.Custid
Vbwindow(cust).vbedit(custname).setname
Vbwindow(cust).vbedit(custage).setage
Vbwindow(cust).vbedit(custphno).setphoneno
Vbwindow(cust).vbutton(submit.click
Testing Tools
SQL Server
QTP
Live Project
NEXT
Vbwindow(mindq).vbcheckbox(testingtools).seton
Vbwindow(mindq).vbcheckbox(sqlserver).seton
Vbwindow(mindq).vbcheckbox(liveproject).set on
Vbwindow(mindq).vbbutton(next)click
- 44 -
Testing Tools
SQL Server
QTP
Live Project
Name
Age
Matrimony
Country
only
o Male
o Female
Photo profiles
- 45 SEARCH
Vbwindow(matrimony).vbedit(name).setsri balaji
Vbwindow(matrimony).vbedit(age).set25
Vbwindow(matrimony).vbedit(country.set India
Vbwindow(matrimony).vbradiobutton(female).set
Vbwindow(matrimony).vbcheckbox(photo profile only).set on
Vbwindow(matrimony).vbbutton(search).click
Select Method:
Select method
is used
Train
No:for selecting an item in a combo box or a list box
Train Name:
Date of Journey:
Fifth Case Study:
From
Develop the script for entering train number, train name, date of journey, selecting starting point,
To
UB
LB
MB
RES
First A/c
Second A/C
Third A/C
Sleeper
Break Fast
Lunch
Dinner
- 46 NEXT
Vbwindow(res).vbedit(trainno).set2085
Vbwindow(res).vbedit(Trainname).setGodavari
Vbwindow(res).vbedit(Date of journey).set15-aug-08
Vbwindow(res).vbcombobox(from).select Sec
Vbwindow(res).vbcombobox(To).selectTpg
Vbwindow(res).vbradiobutton(LB).set
Vbwindow(res).vbradiobutton(sleeper).set
Vbwindow(res).vbcheckbox(breakfast).set on
Vbwindow(res).vbcheckbox(dinner).set on
Vbwindow(res).vbbutton(next).click
Activate Method:
It is used for activating a window or a dialog.
- 47 -
Close Method:
It is used for closing the window or a browser
Syntax: Object hierarchy. Close
Set Secure:
Set secure method is used for setting an encrypted data in to an edit box
Type Method:
Type method is used for performing any kind of key board related operation
Syntax: Object hierarchy. Type key value
Example:
Dialog (login). Winedit(agent name).type mic tab
Descriptive Programming: If at all the objects description is specified in the program itself then that type of programming is
known as descriptive programming
GetRoProperty:
It is used for getting the currant value of the runtime objects property
Syntax: Variable=Object hierarchy.getroproperty(property name)
- 48 -
Form 1
OK
PRODUCT
PID
PNAME
PRATE
QUANTITY
AMOUNT
CAL
- 49 -
Vbwindow(product).vbcombobox(pid).select 007
Q=5
R=vbwindow(product).vbedit(prate).getroproperty Text
EV=r*q
Vbwindow(product).vbedit(quantity.set q
Vbwindow(product).vb button(cal).click
AV=vbwindow(product).vbedit(amount).getroproperty text
If (EV=AV) then
Reporter.reportevent, 0,my report,cal button is working
Else
Reporter.report event,3,my report,cal button is not working
End if
- 50 -
13.Round: It is used for rounding any decimal value to nearest highest integer
Eight-case study:
Develop the script for selecting product id, quantity, clicking on cal button, If it is existing and enabled
and checking weather it is working fine or not
Product
PID
PNAME
PRATE
QUANTITY
AMOUNT
CAL
- 51 -
Vbwindow(procuct).vbcombobox(productid).select 007
Q=10
Vbwindwo(product).vbedit9prate).getroproperty(Text)
R= vbwindwo(product.vbedit(prate.getroproperty(text)
Ev=R*Q
Var1= vbwindow(product).vbbutton(cal).exists
If cstr(var1)=cstr(true) then
Var2=vbwindow(product).vbbutton(cal).getropropertyexists
If cstr(var2)=cstr(true) then
Vbwindow(product).vbbutton(cal).click
Av=vbwindow(product).vbedit(amount).getroproperty(text)
If cint(Av)=cint(Ev) then
Reporter.report event micpass,myreport,result is pass
Else
Reporter.reportevent mic fail,my report,result is fail
End if
Else
Reporter.reportevent mic warning,my report,cal button does not exists
End if
Else
Reporter.reportevent mic warning,my report,cal button is disabled
End if
Get to property:
Gettoproperty is used for getting the text objects properties value
- 52 -
Note: Text objects property means the properties present in the object repository+properties present in
the secret place
Set to property:
Settoproperty Is used for setting the text objects properties value temporarily during the execution
SYNTAX: Object hierarchy.settoproperty property name,property value
OR
SPB
Form 1
NC:Button
Text:start
START
Vbwindow(form1).vbbutton(spb).click
Vbwindow(form1).vbbutton(spb).settoproperty text,stop
Vbwindow(form1).vbbutton(spb).click
Vbwindow(form1).vbbutton(spb).settoproperty text,start
Vbwindow(form1).vbbutton(spb).click
- 53 -
1. Add- sheet: It is used for adding the new sheet for the runtime data table
SYNTAX: Data table.add sheetsheet name
2.Delete- sheet: It is used for deleting a specified sheet from the run time data table
SYNTAX: Data table.delete sheetsheet name
3.Import: It is used for importing the data present in all the sheets in an excel file to the runtime data
table
SYNTAX: Data table.import path of the excel file
4. Import Sheet: It is used for importing specified sheet of data from the excel file to the specified sheet
in the runtime data table
SYNTAX: Data table. Import sheet path of the excel file, source sheet id, destination sheet id
5.Export: It is used for exporting the complete data present in the run time data table to a specified
location
SYNTAX: Data table. export Path of the location with a file name.xls extension
6.Export Sheet: It is used for exporting the data present in a specified sheet in the run time data table
to a specified location
SYNTAX: Data table .export sheet path of the location with a file name.xls extension, sheet id to be
exported.
7.Set currant row: It is used for making the QTP focus on a specified row
SYNTAX: Data table. Set currant row (row number)
8.Set next row: It is used for making the QTP focused on the next of the currently focused row
SYNTAX: Data table. Set next row
9.Set Prev Row: It is used for making the QTP focus on the previous row of the currently focused tow
SYNTAX: Data table. Set prev row
10. Value Method: It is used for getting a value from a specified sheet, specified column and currently
focused row.
- 54 -
11. Get Sheet: It is used for making the QTP to focus on a specified sheet
SYNTAX: Data table. Get sheet (sheet id)
12Get Row Count: It is used for getting the row count of a global sheet
If at all one wants to get the row count of a specified sheet first of all they need to make the QTP to
focus on a specified sheet and then get the row count
Example:
Data table. Addsheet Sri
Data table.import sheet e:\Sri\td122.xls,1,3
N=Data table.get sheet( 3).getrowcount
For i= 1 to n
Data table. Set currant row( i )
Vbwindow(form1).vbedit(val1).set data table(v1,3)
Vbwindow(form1).vbedit(val2).set data table(v2,3)
Vbwindow(form1).vbbutton(add).click
Exp val= data table.value(ev,3)
Act val= vbwindow(form1).vbedit(res).getroproperty(text)
If (exp val= act val) then
Data table (res,3)= pass
Else
Data table (res,3)= fail
End if
Next
Data table.export sheet D;\fl_automation\log\file2.xls,3
Data table.delete Sri
- 55 -
One ca pass number of values in to the function while calling and a function can return
only one value.
Example:
Function add(a,b)
Main program
Res= a+b
Add(10,20)
Add= res
End function
Input/Out put parameters concept is used for passing some values in to the action to return some
values once the execution is finish
To do the same one has to declare the desired number of input parameters and out put parameters at
the action, which is about to be called
Navigation:
Click on OK
- 56 -
Exmaple
vbwindow("Form1").VbEdit ("val1").set parameter ("a")
vbwindow("Form1").VbEdit("val2").Set parameter ("b")
vbwindow("Form1").VbButton("ADD").Click
var= vbwindow("Form1").VbEdit("res").GetROProperty "text"
parameter ("c")= var
vbwindow("Form1").Vbbutton("SUB").Click
var1=vbwindow("Form1").VbEdit("res").GetROProperty "textA"
parameter ("d")=var1
vbwindow("Form1").VbButton("CLEAR").Click
At the calling point one need to specify the input values in a sequence separated by
commas and the variable names in a sequence in order to catch the return value
Example:
Dim qtapp
Dim qttest
Set qtapp= create object (quicktest.application)
Qtapp.launch
Qtapp.visible
Qtapp.opend:\aom1, true
Set qttest=qtapp.test
- 57 -
Qttest.run
Qttest.close
Qttest.run
Attest.close
Qtapp.quit
Oracle connection:
Con .open provider =oraoledb.1;server=local host;uid=scott;pwd=tiger;database=testdata;
SQLServer connection:
- 58 -
Con.open provider= sqloledb.1; server=local host; uid=sa; pwd=; database= test data;
QTP 9.0,9.1,9.2
QTP 9.0:
Test menu item is renamed as Automation
Settings option is moved from test menu item to file menu item
Quality center connection option is moved from tools menu item to file menu
item
Step menu item is removed and all the options present under it are kept in the
edit menu item
- 59 -
A new menu item window is introduced used for managing the window
A new option by name function definition generator is introduced which is used
for creating the functions easily
New options are provided for commenting and un commenting the block of
statements
A new option by name check syntax is introduced under tools menu item used
for checking the syntax of script
Some of the options related to the resources like object repository, recovery
scenario manager are moved from tools menu item to a new menu item
resources
A new menu item resourced is introduced with some new options like object
repository manager and associate repositories
Object repository manager is used for creating and managing the shared
repositories with out having any connection to the test
1. Test pane
2. Active screen
3. Data table
4. Debug viewer pane
5. Tool Options
6. Information screen
7. Missing resources screen
6.Information screen:
Information pane is used for viewing the syntax related information during the syntax
Check
- 60 -
Main change: One can associate one or more shared repositories to an action a part from its local
repository
7.Missing resources:
When the test is being open if at all any associate resources like repositories, library files, recovery
files are missing then the complete information related to that will be shown in the missing resource
pane
QTP 9.1:
A new feature by name navigate and learn is introduced present in multiple
pages or windows continuously by navigating
A new feature by name object repository comparison tool is introduced which is
used for comparing two shared repositories
QTP 9.1 is compatible with windows vista operating system and .net frame 2.0
environment
The script editor is made user friendly
The company has announced that they will provide license for all the add ins
also
QTP 9.2:
A new feature by name screen recorder is provided which is used for recording
the movie of the execution and that can be played back during the result
analysis for better understanding
One can handle the object repositories dynamically through scripting with the
help of an utility object repositories collection
Example:
Repath= d:\r1.tsr
Repositories collection.remove all( )
Repositories collection.add(repath)
vbwindow("Form1").VbEdit ("val1").set 10
vbwindow("Form1").VbEdit("val2").Set 20
- 61 -
vbwindow("Form1").VbButton("ADD").Click
Object spy functionality is enhanced in such a weather one can view multiple
objects information continuously by keeping the mouse pointer over the object
QTP 9.2 is compatible with the following browser
- 62 -