QTP Virtual Objects

Most of QTP users are very familiar with Virtual Objects because it solves unrecognized application objects problem. Sometime we work with those applications that have different types of objects but tool does not recognize and support those objects as object. So for this kind of problem every successful tool provides the facility to recognize those objects as Virtual Object.

QTP tool is also providing same and easy steps to define the Virtual Object. Basically we used Virtual object functionality when tool does not support any application object as object.

As we discussing Virtual Object in respect to QTP tool, there some important points which should get the notice by every QTP users.

Point 1: Define the Virtual Object size and position in the web page by using the crosshairs pointer.

Point 2: During a run session make sure that application window should come in same size and same location. May be it effect the coordinates of virtual object.

Point 3: We can not insert any checkpoints for virtual object.

Point 4: We can not use Object Spy for virtual Object.

Point 5: We can use Virtual Object only in recording and running session.

Point 6: Virtual objects store in the computer, not only for current test.

Point 7: We can define the virtual object only for those object in which, we can click or double click.

We can see the all defined virtual objects with the help of Virtual Object Manager window. Basically it list out the all created virtual objects. We can delete or disable the objects with the help of Virtual Object Manager and Options windows. Virtual Object Manager window provide the facility to delete the objects after selecting them and if you want tool should keep the objects but don’t recognize, for that you have to check the option “Disable recognition of virtual objects while recording” in Tool > Options window.

I think these are the basic and important points for those who want to use Virtual Object feature in QTP and if I’m missing something please update with your valuable comments


QTP Shortcut Keys

My first CTO says that if you want to be smart user of the system, use shortcut keys to handle your system. So I thought that why should not post the list of QTP shortcut keys for QTP users

May be in these most of shortcut keys are common for most of guys but here most of guys are still newbie in QTP.

Ctrl + N- Creates a New Test

Ctrl+Shift+N- Creates a New Business Test

Ctrl+Alt+N- Creates a New Application Area

Shift+Alt+N- Creates a New Function Library

Ctrl+O- Opens an Existing Test

Ctrl+Shift+O- Opens an existing business component

Ctrl+Alt+O- Opens an existing Application Area

Shift+F2- Rename the Action name

Ctrl+M- Make the comment on current row

Ctrl+Shift+M- Remove the comment

Ctrl+Space- Completes the word if you are typing any VBScript method or object in Expert View

F12- For Standard Checkpoint

Ctrl+F12- For Standard Output Values

F7- Step Generator

F8- New Step in Keyword View

Shift+F8- New Step after block of statement

F3- Recording

F4- Stop the Recording

F5- Run the Script

Ctrl+F5- Run the selected step in the script

Ctrl+R- Open the object repository

Shift+Alt+F3- Analog Recording

Ctrl+Shift+F3- Low Level Recording

F11- Step Into

F10- Step Over

Shift+11- Step out

Ctrl+F10- Run to Step

Ctrl+T- Adds the selected item in the Watch tab

Ctrl+F7- Check the Syntax error in the script.

Ctrl+Page Up or Page Down- Toggles between the Keyword and Expert View.

You can add more if I’m missing some shortcut keys.

QTP Testing Framework

To start the testing with QTP, there is an important concept to understand i.e. framework. Frameworks basically define the way to handle the different operations in different methods.

As we all known we can create the test in two ways in QTP i.e. by recording and by scripting. We should also know that how we can improve the quality of test by using Framework concept. Basically QTP supports three kind of framework i.e. Linear, Modular, and Keyword Driven Framework.

In all three frameworks, Linear Framework is very easy and catchy by all newbie and beginner of QTP. Basically Linear Framework deals with individual script which is recorded under one Action and running individual. I think we all done this thing in very first when we get the QTP but I’m very sure, not all one know that we created and executed the test under Linear Framework. Anyway this is not big deal. I was also not aware when I get the QTP first time. So this is very simple and easy way to create the test by navigating through the application. But by using this method there are some limitations which we can not cross. Sometime when we test some business processes in one application, we may feel that some operations we repeat in all Linear Framework Script. To handle this situation we go with Modular Framework which solves this kind of problem by dividing the single test in multiple part or module.

In modular framework, tester basically divides the test in different parts which give the facility to use the different part of scripts in any tests. That solves the many problem of repeataion of test and gives the facility to make the script reusable? So in one sentence, Division of Linear Framework script in different parts called Modular Framework.

To understand the keyword driven framework, tester should know the basic of programming because it deals with function. In programming, Function is an important part of programming as they allow you to create chunks of code that performs a specific task. Basically we create the functions in the one test and calling these functions as keyword in other tests therefore we are calling keyword driven framework. This is very important and useful framework to deal and handle many critical tasks in testing through QTP.

To know these frameworks in more details you can choose any QTP testing materials.

Keyword View of QTP

QTP is having two views to access and analyze the test script that is Keyword View and Expert View.

Keyword View helps to display the recorded script in steps or hierarchical format. It is having some default columns which are important to understand the recorded script.

There are four important columns-

Item- It displays the icon based steps that is, you have done while recording the test. It contains window name, object name, function and etc.

Operation- Operation column shows the type of operation which you performed in the items. For examples select, click and etc.

Value- This column shows arguments which you have given while creating your test script and argument value for selected operation.

Documentation- Documentation section will display some short description in simple English about your step or item. It comes automatically.



QTP Testing Process

I assume that peoples are aware about QTP, so I’m directly switched to describe testing process of QTP.

Testing process is nothing but steps which every tester follows to create any test script in this tool.

There are seven steps to complete any test through QTP.

1: Preparing For Recording- In this step, we check that availability of our application and QTP. Basically we just analyze the application test requirements and ensure that tool will be fulfilled the all needs of application test.

2: Recording A Test Scenario- In this steps we just record the user scenario through the tool.

3: Enhance Your Test- In this step we just enhance the test, means, if there is requirement of different function, parameter, checkpoint and etc then we apply all according to test need.

4: Debugging A Test- Debugging a test ensures that create test is not having any bug and it will complete our testing task successfully.

5: Running Your Test- Just run the test in this step against specified application.

6: Analyze The Test Result- After running the test, it will generate some results, which need to analyze and ensure that test is pass or fail.

7: Report Defects- After analyze the result, if there is not meeting with the requirement, just raise the defect against your application.

QTP Knowledgebase

Hi All,

Specially for QTP learners and Professionals.

I got so many “Thanks” and “Appreciable comments” on my “Interview Question of QTP blog and now I want to say “Thanks” to all you guys. I think QTP is getting so popular in quality area and so many guys are moving with that. That is why I want to start one new thread for QTP learners and professionals. This thread will help to those guys who are new in QTP and who always ask “What” and “How” kind of questions. If you are QTP techie and if you know about any QTP functions. Lets come here for share that knowledge. It will be helpful for learners, professionals and who shares one’s knowledge. Because with this kind of work we can create one knowledge area of QTP. But I have one request to all of guys that if you want to know any thing about QTP then please post reasonable and meaningful questions and answer will be meaningful and with heading like “Recording in QTP“. So with this kind of work we will be updated about QTP. What you guys think? It will be usable or not?

PS: Do not post “Please send me QTP interview questions” comments on this blog.



Interview Questions of QTP

Full form of QTP?

Quick Test Professional

What’s the QTP?
QTP is Mercury Interactive Functional Testing Tool.

What’s the basic concept of QTP?
QTP is based on two concept-

  • Recording
  • Playback

Which scripting language used by QTP?
QTP using VB scripting.

How many types of recording facility are available in QTP?
QTP provides three types of recording methods-

  • Context Recording (Normal)
  • Analog Recording
  • Low Level Recording

How many types of Parameters are available in QTP?
QTP provides three types of Parameter-

  • Method Argument
  • Data Driven
  • Dynamic

What’s the QTP testing process?
QTP testing process consist of seven steps-

  • Preparing to recoding
  • Recording
  • Enhancing your script
  • Debugging
  • Run
  • Analyze