Quick Test Professional - QTP Session -2 VeriTest, Chennai
Session-2: Agenda
Introduction
Associating Add-ins
Recording Modes How to record Recorded script overview How to run the script Test Results Actions
Q & A
QTP- Introduction
Functionality Testing tool Product of Mercury Interactive Scripting language used vb script Platform dependent
Associating Add-ins with Your Test
When you open QuickTest, you select the add-ins to load from the Add-in Manager dialog box. You can record on any environment for which the necessary add-in is loaded.
QuickTest Window
Tool bar Active Screen Data sheet
QuickTest Window Contd..
The QTP window contains the following key elements:
Title barDisplays the name of the currently open test.
Menu barDisplays menus of QTP commands. Automation toolbarContains buttons to assist you in the testing process. Debug toolbarContains buttons to assist you in debugging tests. Test paneContains the Keyword View and Expert View tabs.
QuickTest Window Contd..
Active ScreenProvides a snapshot of your application as it appeared when you performed a certain step during the recording session. Data TableAssists you in parameterizing your test. Debug Viewer paneAssists you in debugging your test. The Debug Viewer pane contains the Watch, Variables, and Command tabs.
Information paneDisplays a list of syntax errors found in your test.
Status barDisplays the status of the QuickTest application.
Keyword View
Expert View
Recording Modes
Standard Recording mode Analog Recording Low level Recording
10
How to Record
Choose Automation > Record or click the Record button Record and Run Settings dialog box opens. . The
11
How to Record-Contd.
Click OK. QTP begins recording and captures every action the user perform Click Stop on the Testing toolbar to stop the recording process.
12
Recorded Script Overview
Dialog("Login").WinEdit("Agent Name:").Set "asdfsdf Dialog("Login").WinEdit("Password:").SetSecure 459c8c118e221abb5d15ce66a11571e83816c8cb Dialog("Login").WinButton("OK").Click Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..." Entering agent
name Entering Password
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set "5" Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click Window("Flight Reservation").WinMenu("Menu").Select "File;Exit
13
How to run the script
Click Run or choose Automation > Run. The Run dialog box opens. Select Temporary run results folder. Accept the default results folder name. Click OK to close the Run dialog box.
14
Test Result Analysis
When QTP finishes running the test, The Test Results window opens.
15
Actions
Actions help divide your test into logical units, such as specific activities that you perform in your application.
A test comprises calls to actions. When you create a new test, it contains a call to a single action. By creating tests that call multiple actions, you can design tests that are more modular and efficient.
16