Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 42

TESTING TOOLS

Quick Test Professional

1
QTP Testing Process
 It Consists of Seven main phases.
Preparing to record
Recording a session on your application
Enhancing your test
Debugging your test
Running your test
Analyzing the test results
Reporting the Defects.

2
Test Pane
 Test pane is used to view the recorded script
or to write a new script for an object. There
are two types of views in test pane. They
are:
1. Key word view: In this view you can select
the object from object repository and can insert
an method to it.
2. Expert view: In this view you can write the
code directly.

3
 Other components present in this pane are:
1. Data Table: There are 2 types of sheets.
○ i. Global Sheet: This enables you to share
information from one action to another action.
○ Ii. Action Sheet: Each action has its own sheet in
the data table. So that you can insert data that
applies to only that action.
2. Active Screen: The Active screen provides a
snapshot of your application, as it appeared when
you performed a certain step while recording your
test. This enables you to easily parameterize
object values and insert checkpoints, methods
and output values for any object in the page

4
Object Repository
 When we want to write scripting on any
window then we have to learn the window
before starting scripting in order to recognize
each and every object present in the
application by the tool.
 It is used to learn all the objects properties in
a window or a single object’s properties of a
window.
 Navigation
Start Quick Test Professional Quick Test
Professional Tools Object Repository.
5
GUI Spy
 GUI Spy is used when ever the user want to
know the properties of an object.

 It will display the entire information of the


object which we are specifying or selecting.

 Navigation
Start Quick Test Professional Quick Test
Professional Tools GUI Spy.

6
Run Modes
 After completion of scripting for an object we
need to run it for result. So according to it
there are 2 types of run modes according to
their functionality. They are:
1. Debug: For displaying the results temporarily
and it is used for checking the running of the
script.
2. Verify: For displaying and to store the result in
a specified path and the results can be viewed at
any time.

7
Recording Modes
 Recording modes are used to record the
movements of the mouse, keyboard
insertions and selection of objects in the
window. According to its functionalities these
are divided in to three types. They are:
1. Normal Recording
2. Analog Recording
3. Low Level Recording

8
Recording Modes
 Normal Recording
To record the objects in your application and the
operations performed on them. By default the recording
mode will be Normal Recording mode.
 Analog Recording
To record the every movement of the mouse. It is used
signatures and drawing purpose.
 Low-Level Recording
Low-Level is used for recording on environments or
objects not supported by quick test and it is used when
you need to record the exact location of the object on
your application screen
9
Check Points
 A checkpoint is a verification point that compares a
current value for a specified property with the
expected value for that property.
 There are 7 types of check points. They are:
1. Standard Check Point.
2. Text Check Point.
3. Text Area Check Point.
4. Bitmap Check Point.
5. Database Check Point.
6. Accessibility Check Point.
7. XML Check Point.

10
1. Standard Check Point
 It is used to check the properties of an
object. It may be a single property or multiple
properties we can implement by using this
single check point.

 Navigation:
Quick Test Professional Click on Insert tab
Select Check Points Select Standard Check
Point.

11
2. Text Check Point
 It is used to check the content of the text
present in the window/object which is being
specified or selected for checking.

 Navigation:
Quick Test Professional Click on Insert tab
Select Check Points Select Text Check Point.

12
3. Text Area Check Point
 It is used to check the content of the text
present in the selected portion of window/
object which is being specified or selected
for checking.

 Navigation:
Quick Test Professional Click on Insert tab
Select Check Points Select Text Area Check
Point.

13
4. Bit Map Check Point
 It is used to check the bitmap images
present in the window/object. And we can
check the selected portion of the image

 Navigation:
Quick Test Professional Click on Insert tab
Select Check Points Select Text Area Check
Point.

14
5. Database Check Point
 It is used to check the database connectivity
and the retrieval of content from the
database.

 Navigation:
Quick Test Professional Click on Insert
tab Select Check Points Select
Database Check Point.

15
6. Accessibility Check Point
 Accessibility check point used to identify the
areas of your Web site that may not conform
to the World Wide Web Consortium (W3C)
Web Content Accessibility Guidelines.

 Navigation:
Quick Test Professional Click on Insert tab
Select Check Points Select Accessibility Check
Point.

16
7. XML Check Point
 XML check point is used to check the data
content of XML documents in XML files or
XML documents in Web pages and frames.

 Navigation:
Quick Test Professional Click on Insert tab
Select Check Points Select Accessibility Check
Point.

17
Out Put Values
 An output value is a step in which one or
more values are captured at a specific point
in your test or component and stored for the
duration of the run session. The values can
later be used as input at a different point in
the run session.
 Navigation:
Quick Test Professional Click on Insert tab
Select Output values.

18
Out Put Values
 There are 7 types of output values according
to their functionalities. They are:
1. Standard output values
2. Text output values
3. Text Area output values
4. Database output values
5. XML output values

19
1. Standard Output Value
 Standard output values is used to output the
property values of most objects.
 You can use standard output values to
output text strings by specifying the text
property of the object as an output value.
 Navigation:
Quick Test Professional Click on Insert tab
Select Output values Select Standard output
value.

20
2. Text Output Value
 Text output value is used to output text
strings displayed in a screen or Web page.

 Navigation:
Quick Test Professional Click on Insert tab
Select Output values Select Text output value.

21
3. Text Area Output Value
 Text Area output value is used to output text
strings displayed in a screen or Web page.
When creating a text output value, you can
output a part of the object’s text.

 Navigation:
Quick Test Professional Click on Insert tab
Select Output values Select Text Area output
value.

22
4. Database Output Value
 Database output values is used to output the
value of the contents of database cells,
based on the results of a query.

 Navigation:
Quick Test Professional Click on Insert tab
Select Output values Select Database output
value.

23
5. XML Output Value
 XML output values is used to output the
values of XML elements and attributes in
XML documents.

 Navigation:
Quick Test Professional Click on Insert
tab Select Output values Select XML
output value.

24
Step Generator
 Step Generator is used to insert an specified
function or step.
 If you select functions in the category box list,
you can choose one of the following options
from the library box list:
All—Enables you to select a function from all the
available functions and types.
Library functions—Enables you to select a
function from any library file associated with your
test or component.

25
Step Generator
Built-in functions—Enables you to select any
standard VBScript function supported by Quick
Test.
Local script functions—Enables you to select any
local function defined directly in the current action
or component.
You can select the required function from the
operation box list, which displays the functions
available for the selected function type in
alphabetical order.

26
Data Driven Test
 Data driven test is used to assign a bunch of
data for an object to run continuously up to
the end of data.

 Procedure to follow is:


1. Parameterize the values
2. Local and Global Data Tables

27
1. Parameterizing the values
 Record ON.
 Perform the complete operation for what you
need to do data driven test.
 Stop recording.
 Block the value which you need to
parameterize.
 Tools Data Driver…Click on
parameterize… Click on Next Click on
Next Click on Finish Click on OK.

28
2. Local and Global Data Tables
 Local and Global Data Tables are used
to store or enter data into them.

 After completion of parameterization a


column will be displayed with the
parameterized value. So enter some
more data which has to be tested.

29
Some of the functions
 1. InputBox Method:
String expression displayed as the message in the dialog
box.
 Syntax:
var=InputBox(prompt)
 Example:
Z=inputbox ("Enter your name")
If z="srinivas" Then
 dialog("Login").WinEdit("Agent Name:").Set z
 dialog("Login").WinEdit("Password:").SetSecur e
"mercury"
End If

30
 2. Wait Method:
It will wait until the specified object property
achieves the specified value or exceeds the
specified timeout before continuing to the next
step.
 Syntax:
var=Wait(Seconds)
 Example:
 Z=wait(“5”)
 Msgbox “waited upto 5 seconds”
 ‘the execution will wait until the specified time
expires

31
 3. Capture Bitmap Method :
This method saves a screen capture of the
object as a .png or .bmp image using the
specified file name.

 Syntax:
object.CaptureBitmap FullFileName,
[OverrideExisting]

 Example:
 Dialog("Login").CaptureBitmap
“d:/sri.bmp”,true/false

32
 4. Exists property Method:
 It checks whether the object currently exists in the
open application.
 Syntax:
 object.Exist([TimeOut])
 Example:
 If (Dialog("Login").Exist) then
 Dialog(“Login”).winedit(“Agent Name:”).set
“srinu”
 Dialog(“Login”).winedit(“Password:”).
Setsecure “mercury”
 Dialog(“Login”).winbutton(“OK”).click
 Endif
33
 5. GetToProperty Method:
This method will be returning the value of a specified property
for a test object. The value is taken from the Object Repository.

 Syntax:
object.GetTOProperty(Property) 

 Example
z=Dialog("Login").GetTOProperty ("nativeclass")
If z=true Then
 msgbox "The Login window’s native class is present in
Object Repository"
 else
 msgbox " The Login window’s native class is not present in
Object Repository "
End If
34
 GetRoProperty Method:
It returns the current value of the test object
property from the object in the application.
 Syntax:
object.GetROProperty (Property, [PropertyData])
 Example:
z=Dialog("Login").GetROProperty("focused")
If z=true Then
 msgbox "The Login window is focussed"
 else
 msgbox "The Login window is not focussed"
End If

35
 GetItem Method:
Returns the current value of the item specified to the output.
 Syntax:
object.Getitem(number)
 Example
Window("Flight Reservation").Activate
Window("Flight Reservation").ActiveX("MaskEdBox").Type "121212"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Click
a=window("Flight Reservation").Dialog("Flights Table"). WinList("From").
GetItem(1)
Window("Flight Reservation").Dialog("Flights
Table").WinList("From").Select a
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "sdfgh"
Window("Flight Reservation").WinButton("Insert Order").Click

36
 GetItemProperty
Returns the current value of the specified
property for the specified menu item.

 Syntax:
object.GetItemProperty (Item, Property)

 Example:
Z = Window("Flight
Reservation").WinMenu("Menu").GetItemPropert
y("File", "SubMenuCount")
Msgbox z

37
 Create Text File Method
Creates a specified file name and returns a text-
stream object that can be used to read from or
write to the file.

 Syntax:
  object.CreateTextFile(filename[, overwrite[,
unicode]])

 Example:
Set fso=createobject
(“Scripting.FileSystemObject”)
Z = fso.CreateTextFile("c:\\testfile.txt", true);
38
 CreateFolder Method
Creates a folder in the address location where we
are specifying.

 Syntax:
Object.CreateFolder(foldername)

 Example:
Set
fso=createobject(“System.FileScriptingObject”)
f = fso.CreateFolder("c:\srinu")

39
 GetVisibleText Method:
This method is used to return the text from the specified
area.
 Syntax:
object.GetVisibleText ([Left], [Top], [Right], [Bottom])
 Example:
Window("Flight Reservation").Activate
Window("Flight
Reservation").WinMenu("Menu").Select"Help;About..."
Window("Flight Reservation").Dialog("About Flight
Reservation").Activate
a=window("Flight Reservation").Dialog("About Flight
Reservation").GetVisibleText
msgbox a

40
 LCase Method:
The input may be any thing either in uppercase or
upper & lower mixed but it returns a string that has
been converted to lowercase.

 Syntax:
LCase(string) 

 Example:
A=inputbox("Enter your name")
B=lcase(A)
msgbox B

41
 UCase Method:
The input may be any thing either in lowercase
or upper & lower mixed but it returns a string that
has been converted to uppercase.

 Syntax:
UCase(string) 

 Example:
A=inputbox("Enter your name")
B=ucase(A)
msgbox B

42

You might also like