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

Is AI taking over your job in software development and testing? 😱"

Are you a software developer or tester feeling threatened by the rise of AI in your industry? 😰 You're not alone. Many professionals in the field are concerned about the potential consequences of AI's integration into software development and testing. While some experts believe that AI can bring significant benefits to the industry, others worry that it could replace human expertise altogether. 🤔 AI algorithms can analyze massive amounts of data and automate many tasks, but they cannot replace the critical thinking and creativity of human beings. Additionally, there are ethical concerns associated with the use of AI in software development and testing. So, what can you do to ensure that you're not replaced by AI in your job? 💪 First, it's essential to recognize that AI is not a replacement for human expertise but rather a tool to augment it. Therefore, it's essential to learn how to work with AI-powered systems to increase your efficiency and productivity. Additi

Revolutionize software testing with AI! 🤖💻 Share your thoughts on ethical implications in the comments.

  As technology evolves, so too does the field of software testing. One exciting development in recent years is the use of AI (Artificial Intelligence) to automate repetitive tasks and improve testing accuracy. Through analyzing large amounts of data and identifying patterns, AI can help identify potential defects or vulnerabilities in software. AI-powered tools can also generate test cases and scenarios by simulating user behavior and input, allowing for more efficient and effective testing. In addition, machine learning algorithms can analyze and learn from past testing data, leading to better predictions and more streamlined testing. AI-powered tools can also help identify and prioritize critical bugs and defects, saving valuable time and effort in manual testing. But it's important to note that AI-powered testing is not a replacement for human testers. While AI can automate certain tasks and help identify potential issues, it's still necessary for human testers to provide a

HP Quality Center - Best Practices

1.Introduction Quality Center is a test management tool which provides very good features for managing both your manual and automated test cases. This paper highlights the best practices for managing your test cases. When you open Quality center, depending on your rights it display the below mentioned option in the sidebar: 1. Requirements 2. Test Plan 3. Test Lab 4. Defects 5. Dashboard 2.Requirements When you have assigned with the responsibility of developing your test cases in the quality center then you must be wondering where to start with. I am going to share my experience to overcome such a situation. You need to find the solution of some question before you start writing your test cases. 1. Is your requirement developed and available? 2. Is your requirement organized in a logical sequence? If answer to both of the above question is Yes, then you can start with Requirement option in the side bar. In case your requirement is under development, then you keep your