Skip to main content

HP QTP Tutorial Chapter 4

1 View Menu

The View Menu will provide you the options for setting the view of your Test. You can choose to view or hide the various options available under View Menu. The below section will outline the important information on the options of View Menu. See the below screen shot for the options available under View Menu:
clip_image002

1.1 Active Screen

The Active Screen is a screen which shows the Screen Shot capture while doing the recording. You will be able to see the Screen Shot, if your QTP Settings allow capturing Active Screen.
If you are not able to see the Active Screen after recording is completed, just goto View->Active Screen (Check for a tick mark against this option in View Menu). See the bottom panel where you will see an Active Screen Tab. (See screen shot below)
clip_image004
As a best practice, you can enable this option but while saving the Test, do not save Active Screen with your test; it will unnecessarily increase the resources on your drive.

 1.2 Available Keywords

This is a new feature of QTP 10.0 which helps you in doing your scripting in a much easier way. You can simply drag and drop the keywords in expert view and a corresponding code will get inserted automatically. For e.g. If I have a button on my home page, then when I will drag and drop that button in the expert view, a complete statement consisting Browser, Page, Web Button, Click will get added. This feature will come very handy while doing scripting, as you can directly insert the Function Call, OR events etc. See the below screen shot:
clip_image006
If you are not able to see the Available Keywords pane, then goto menu View->Available Keywords.

 1.3 Data Table

To view the Data Table Pane, click View->Data Table. The Data Table pane allows you to see the data that will get loaded when the test will run. You can also set the Global Data and Local Data from the Data Table Pane. See the below screen shot:
clip_image008
The Global sheet will have the data that will be used globally while the Action Sheet data will be used locally. This pane will get used very frequently when you are doing the scripting.

 1.4 Debug Viewer

When you want to debug your script, then Debug Viewer Pane will be very useful. You can enable the Debug Viewer pane from View->Debug Viewer. To make use of Debug Viewer, you need to add watch so that the variable added in Watch will be visible in the Debug Viewer Pane.
clip_image010
In Debug Viewer, you have three tabs, Watch, Variable, and Command. You can make use of these 3 tabs to debug your script. The command tab will help you in modifying the value of the code and debugging the problems. These tabs were very useful for scripter.

 1.5 Information

This tab will give you information on VB Syntax Error, when you move from Keyword View to Expert View or vice versa. You can check the syntax by pressing Ctrl+F7 or goto Tools->Check Syntax.
clip_image012

 1.6 Missing Resources

The Missing Resource Pane will provide information if QTP was not able to load any external files references in your Test. The External file can include Library File for Functions, Reusable Actions, External Actions.
clip_image014

 1.7 Process Guidance

This is new to QTP 10.0. This will guide you how you can start your workflow. You will see a descriptive guideline for each of the activities. This is not a wizard but just a guide so that new user can get acquainted with QTP much faster. The screen shot is shown below:
clip_image002[4] clip_image004[4]

1.8 Resources

The Resources Pane is new in QTP 10.0 (not aware about 9.5) and helps one in managing the Test Scripts. You can associate Functional Library, Recovery Scenario, Object Repository. You can also Delete the Action and view the OR. If you are not able to view this pane, then click View->Resources. See screen shot below:
clip_image016

 1.9 Test Flow

The Test Flow is also a new feature in QTP 10.0. This will again make your life easier wherein you can easily understand the flow of your Test Cases. You can move the Actions and do a lot with this pane. If you are not able to see (although this pane get loaded as default), click View->Test Flow. See the below screen shot:
clip_image018

 1.10 To Do

This is new in QTP 10.0. You can add your to do items in the To Do Pane. To access, goto View->To Do. See the screen shot:
clip_image020
You can see Tasks and Comments tab in the To Do Pane. You can add To do using the upper tool bar which is visible in above screen shot. The comments tab help you in viewing the comments provided in External Actions and Functions provided the comments exist with keyword //To Do, todo, to-do, or TODO (not case-sensitive). You can also export the To Do List in XML or XLS.

 1.11 Expand & Collapse All

You can expand the entire Item present in the Keyword View from View-Expand All. Similarly to callable the test tree, click View->Collapse All. Alternatively you can use + to expand and – to collapse all.

 1.12 Keyword & Expert View

The switching between views can also be done through View Menu. Select Keyword or Expert View from View Menu to switch between the 2 modes. The Keyword View is the tree based structure of your Test Script. Both these views can be used while doing the scripting. Advance QTP user prefers to work mostly in Expert View rather than Keyword View.

 1.13 Toolbars

The Toolbars section under View->Toolbars help you show & hide the below mentioned toolbars. These toolbars are very handy when you are doing your scripting. As a best practice always enable the below mentioned Toolbars:
# Standard
# Automation
# Tools
# Standard
# View

 1.13.1 Standard

The Standard Tool bar is shown below. You can enable or disable it by clicking View->Toolbars->Standard (Do check the Tick Mark after you enable)
clip_image022
You can use Standard Toolbar to Open an Existing Test, Create a New Test, Save the Test, Save the Test with All Resource (not recommended), Settings, Enable Editing, QC Connection. You can further customize the above tool bar by clicking the down arrow in above screen shot. This screen is very self explanatory.

 1.13.2 Automation

The Automation Toolbar is shown below. View->Toolbars->Automation (Do check the Tick Mark after you enable)
clip_image024
You can use above toolbar to record, run, stop, change recording mode (analog and lowlevel), view Test Result, Open Object Repository Window. The Customization of command can also be done by clicking the down arrow which will provide option for customization.

 1.13.3 Debug

The Debug toolbar is shown below. View->Toolbars->Debug (Do check the Tick Mark after you enable)
clip_image026
As the name suggest the Debug toolbar is helpful while doing the Test Script debugging. You can Pause the Test, Step Into (Keyboard shortcut is F11), Step Over (very frequently used. Keyboard shortcut is F10), Step Out (Shift+F11), Insert Breakpoint (F9), Clear all Breakpoint, Enable/Disable All Breakpoint.

 1.13.4 Edit

The Edit toolbar is shown below. View->Toolbars->Edit (Do check the Tick Mark after you enable)
clip_image028
All the Edit commands such as Undo, Redo, Comment Code (Ctrl+M), Uncomment Code (Ctrl+Shift+M), Search and Replace are available in this toolbar.

 1.13.5 Insert

The Insert toolbar is shown below. View->Toolbars->Insert (Do check the Tick Mark after you enable)
clip_image030
The commands available in this Toolbar are Insert Checkpoint or Output Value, Call to an Action, Split Action (will be enabled after test script has been selected), Step Generator, Transaction Start Time and Transaction End Time. The Start Time and End Time transaction is very useful in knowing the time taken by application to complete a flow.

 1.13.6 Tools

The Tools toolbar is shown below. View->Toolbars->Tools (Do check the Tick Mark after you enable)
clip_image032
The commands available in this Toolbar are Options, Check Syntax (Ctrl +F7), Object Spy.

 1.13.7 View

The View toolbar is shown below. View->Toolbars->View (Do check the Tick Mark after you enable)
clip_image034
Using this tool bar you can show and hide the pane such as Test Flow Pane, Available Keywords Pane, Resource Pane, Datatable, Active Screen, Process Guidance, To Do Panes.

 1.13.8 Action

The Action is shown below. View->Toolbars->Action (Do check the Tick Mark after you enable)
clip_image036
The Action toolbar provides an easy way to navigate across Actions. You can easily go to various reusable actions that is getting used in your test script. This is very useful toolbar.

 2 References

 Quick Test Professional Tool.

 3 Additional information

You can email me on Sachin.vasudha@gmail.com with any query.

Comments

QPT said…
Thanks for the detailed tutorial.
QTPbook

Popular posts from this blog

Mantis - Defect Management Tool - User Guide

Introduction This white paper contains information related to an open source defect management tool called Mantis which is freely available for managing all your defects. Where to Download One can download the latest version of Mantis from http://sourceforge.net/project/showfiles.php?group_id=14963 Download the “mantis-stable” and then “mantis-x.y.z.zip”.1.1 PRE-REQUISITE Operating System Windows 2003 Server, MacOS, OS/2, Linux, Solaris Database MySQL database 3.23.2 and higher Software PHP 4.0.6 and higher Application Server Apache 1.3, Apache 2.0.54, IIS 6.0 with Web Services Extension Browser IE6 and above, Mozilla Firefox STEPS FOR INSTALLATION – FOR WINDOWS MySQL Installation Install MySQL by downloading it from http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-gui-tools-5.0-r6-win32.msi/from/http:/www.mirrorservice.org/sites/ftp.mysql.com/ . Please follow the below mentioned steps while installing MySQL: (Please remember the password for “root” account...

Why to do Software Testing?

Regardless of the limitations, testing is an integral part in software development. It is broadly deployed in every phase in the software development cycle. Typically, more than 50% percent of the development time is spent in testing. Testing is usually performed for the following purposes: To improve quality. As computers and software are used in critical applications, the outcome of a bug can be severe. Bugs can cause huge losses. Bugs in critical systems have caused airplane crashes, allowed space shuttle missions to go awry, halted trading on the stock market, and worse. Bugs can kill. Bugs can cause disasters. The so-called year 2000 (Y2K) bug has given birth to a cottage industry of consultants and programming tools dedicated to making sure the modern world doesn't come to a screeching halt on the first day of the next century. [Bugs] In a computerized embedded world, the quality and reliability of software is a matter of life and death. Quality means the conformance to the ...

Is BCI (Brain Computer Interface) a road to immortality?

What is a Brain-Computer Interface? Brain-computer interface is a technology which can read your mind and display it on a device - a mobile, laptop or TV screen. It means what data is being carried by our billion neurons are prone to hack.  When combined with other mechanical devices, can also be used to control the device.  So in future, if you want to switch on your TV or light, you just have to think and that's all.  Google and Alexa home will be replaced by BMI controlled devices.  I am not an expert in this field but based on my research and analysis, I can predict that when BMI tech will get matured, the human can do brain to brain talk and many other magical things - in future Telepathy will be a day to day affair. BCI can give you all kind of experience from the comfort of your home.  You can go on vacation without leaving your bedroom. You can have romantic experience without having a partner and many more such experiences. ...