QTP Interview Questions and Answers

1. Name the types of Test Automation?
Record and Playback (does not work in real world scenario)
Functional decomposition
Keyword driven
Model Based
Hybrid Test Automation Framework etc.

2. Explain the benefits of using Test Automation?
It can be executed unattended, leaving the testers free to do other work.
Large number of data combinations can be run - Good coverage.
Re-use of test cases in the different releases/versions etc.

3. Give the names of some Test Automation products/vendors?
QuickTest Professional - HP
Rational Robot - IBM

4. When to use Test Automation?
In one short line
Successful test-automation needs to start early in the development cycle.
For elaborate reading see:

5. Give a to the point narration of what Test Automation is?
Test automation is the use of software to control the execution of tests, the
comparison of actual outcomes to predicted outcomes, the setting up of test
preconditions, and other test control and test reporting functions. Commonly, test
automation involves automating a manual process already in place that uses a
formalized testing process. (Wikipedia)

6. Write advantages of using Test Automation?
Refer to Answer 2

7. Name any three types of applications you can run Test Automation on?
Test automation can be run on Windows applications, Web applications, .Net
Applications, Java applications etc.

8. When would we not want to use Test Automation?
If the product is not mature enough.
If you don't have the time. The product is to be shipped after one month and you
think you can buy a tool and automate a testing process in order to complete early
is all rubbish. (See answer 4)

9. Give the steps of GUI Test Automation?
(related to QuickTest)
Analyzing your application
Preparing the testing infrastructure
Building your tests and adding steps to them
Enhancing your test
Debugging, running, and analyzing your test
Reporting defects

10. Explain the difference between Keyword view and Expert view?
The Keyword View is comprised of a table-like view, in which each step is a
separate row in the table, and each column represents the different parts of the
In the Expert View, you can view an action in VBScript. If you are familiar with
VBScript, you can add and update statements and enhance your tests and
function libraries with programming.

11. How to start recording with a keyboard shortcut?

12. How to stop recording with a keyboard shortcut?

13. How to playback from top with a keyboard shortcut?

14. Is it possible to customize keyword view Fonts and colors?
Yes, Tools ->View Options.. and go to Fonts and Colors tab.

15. When will you use Shared and when local object repository?
Local Object Repository may be used if
You have only one, or very few, components that correspond to a given
application, interface, or set of objects.
You do not expect to frequently modify object properties.
Shared Object Repository may be used if
You expect the object properties in your application to change from time to time.
You have several components that test elements of the same application,
interface, or set of objects.

16. What will you choose between OR and DP and why?
Object Repository or Descriptive Programming

17. What is the use of the Object Repository?
All About Object Repositories

18. What's the extension of the exported Object Repository file?

19. Explain when is the Object Repository read from?
At run time.

20. Write any 3 advantages of the Object Repository?
Refer to Answer 16

21. Why is there a need for an Object Repository Administrator?
Its not necessary but it is quite a lot helpful to have one to manage (create new
ORs, manage repository parameters, modify object details, merging etc) shared
object repositories and to see that the reusibility of the tests is maintained w.r.t.
shared object repository.

22. When exactly is the Object Repository populated?
During recording.

23. Explain what is a Shared Object Repository?
Refer to Answer 17

24. Explain the steps to modify a Shared Object Repository?
You can modify a test object in the shared object repository using the Object
Repository Manager.
To modify a test object property:
Right-click the step containing the test object that changed, and choose Object
Properties or choose Edit > Step Properties > Object Properties from the menu
The Object Properties dialog box opens and displays the properties QuickTest
uses to identify the object.
Modify the properties and values as required. You modify the properties and
values in the Object Properties dialog box in the same way as you modify the test
object details in the Object Repository window.
Click OK to close the dialog box.
---------- ----------
The object details area for shared object repositories in the lower right side of the
document window enables you to view and modify the properties and property
values used to identify an object during a run session or the properties of a
checkpoint or output object.
After making sure that your shared object repository is editable, and that it is the
active window, you modify object details for objects in a shared object repository in
the same way as you modify them for local objects. etc

25. How do you assign a Shared Object Repository to an action?
You can associate a single action with an object repository by right-clicking the
action in the Resources pane and choosing Associate repository with action from
the context menu.
You can use the Associated Repositories tab of the Action Properties dialog box
(Edit > Action > Action Properties) to associate one or more object repositories
with the current action etc.

26 What are the names of UI Objects?
Few examples are Button, Listbox, Checkbox

27 Write the names of any 3 UI Objects?
Refer answer 26

28 What is a Test Object?
A test object is an object that QuickTest creates in the test to represent the actual
object in your application. QuickTest stores information on the object that will help
it identify and check the object during the run session.

29 Explain what do you mean by run-time objects?
A run-time object is the actual object in your application on which methods are
performed during the run session.

30 What is the class attribute of a UI Object?
Few examples are WinButton, WinEdit etc

31 What is the physical description or attributes of a UI Object?
For example for an OK button physical attributes can be Class Name = WinButton,
text = 'OK' etc

32 How and Where can I modify a name of a Test Object?
Refer to answer 24

33 How can I highlight a Test Object and make it flash?

You can select a test object in your object repository and highlight it in the
application you are testing. When you choose to highlight a test object, QuickTest
indicates the selected object's location in your application by temporarily showing
a frame around the object and causing it to flash briefly.
Make sure your application is open to the correct window or page.
Select the test object you want to highlight in your object repository.
Click the Highlight in Application button or choose View > Highlight in Application.
The selected object is highlighted with a border in the application.

34 Explain the purpose of Object Spy?
Using the Object Spy pointing hand mechanism, you can view the supported
properties and methods of any object in an open application.

35 What is a virtual object?

You can teach QuickTest to recognize any area of your application as an object by
defining it as a virtual object. Virtual objects enable you to create and run tests on
objects that are not normally recognized by QuickTest.

36 What is the need of virtual objects?

Your application may contain objects that behave like standard objects but are not
recognized by QuickTest. You can define these objects as virtual objects and map
them to standard classes, such as a button or a check box.

37 How to assign an object to a variable?

Using a Set statement.
e.g. Set FSO = CreateObject("Scripting.FileSystemObject")

38 What is a DLL?

Please see

39 Explain how to declare DLL functions?

Please see

40 Explain how to call DLL functions?

Please see

41 What is the reason for Synchronizing the Run Session?
Because applications don’t always respond to user input at the same speed from
one test to another

42 Give two reasons for delays causing synchronization problems?

For a window to pop up
For a progress bar to reach 100%

43 Explain what is a Client/Server application?

The client-server software architecture model distinguishes client systems from
server systems, which communicate over a computer network.

44 Explain the reason that why does a script fail when synchronization
problems occur?

One of the possible reasons might be that Quicktest by default waits a certain
amount of time before it continues the test and the Server was not finished and
took longer than expected

45 What is a synchronization point?
Please see

46 How is the synchronization wait time determined, what plus what?
When working with Web objects, QuickTest waits up to the amount of time set for
the Browser navigation timeout option, plus the time set for the object
synchronization timeout

47 What else can be done if QTP is unable to solve synchronization problems?
Use Wait or Exist etc

48 Why do we use actions?
Actions help divide your test into logical units.
Actions enable you to parameterize and iterate over specific elements of a test. etc
QuickTest Professional Actions

49 Explain what is a reusable action?
QuickTest Professional Actions

50 How to call an action from another action?

Using RunAction
Open a new test.
Action1 is there by default. Go to its expert view and type
msgbox "Action 1"
Go to Keyword View and from Insert (menu) choose Call to New Action. Insert Call
to New Action dialog opens. Just click ok. Go to its expert view and type
msgbox "Action 2"
Go to Keyword View and from Insert (menu) choose Call to New Action. Insert Call
to New Action dialog opens. Just click ok. Go to its expert view and type
RunAction "Action1"
In the Keyword View make sure that Action3 is highlighted
Go to Automation (menu) and choose Run Current Action.

51. What is an action?
When you create a test, it includes one action. Actions help divide your test into
logical units, such as the main sections of a Web site, or specific activities that you
perform in your application.

52. What is action template?
If you want to include one or more statements in every new action in your test, you
can create an action template. For example, if you always enter your name as the
author of an action, you can add this comment line to your action template. An
action template applies only to actions created on your computer.

53. What are the different types of actions?


54. Explain the difference between the global and action data table?

When you output a value to the Data Table or add a Data Table parameter to your
test, you can specify whether to store the data in the Global data sheet or in the
action data sheet. Using Global sheet enables you to pass information between
Current action sheet (local): Each action also has its own sheet in the Data Table
so that you can insert data that applies only to that action.

55. How many actions can we add/Insert in a particular test?

56. What is the difference between Call to copy of Action and Call to
Existing Action?

When you insert a call to a copy of an action into a test, the original action is
copied in its entirety, including checkpoints, parameterization, the corresponding
action tab in the Data Table, plus any defined action parameters. If the test you are
copying has objects in the local object repository, the copied action's local object
repository is also copied together with the action. The action is inserted into the
test as an independent, non-reusable action (even if the original action was
You can insert a call to a reusable action that is stored in your current test (local
action), or in any other test (external action). Inserting a call to an existing action is
similar to linking to it. You can view the steps of the action in the action view, but
you cannot modify them. The called action's local object repository (if it has one) is
also read-only. If you call an external action, you can choose, however, whether
you want the data from the action's data sheet to be imported as a local, editable
copy, or whether you want to use the (read-only) data from the original action. To
modify a called, external action, you must open the test with which the action is
stored and make your modifications there. The modifications apply to all tests that
call that action.

57. Explain an action parameter?

58. How do I call an action from another test?

Using Insert->Call to Existing Action

59. How to pass a parameter into an Action?


60. What is checkpoint timeout?
Specifies the time interval (in seconds) during which QuickTest attempts to
perform the checkpoint successfully.

61. Explain types of Checkpoints you know?

62. Explain when bitmap checkpoint is used?
By adding bitmap checkpoints to your components, you can check the appearance
of elements in your application by matching captured bitmaps.
You insert bitmap checkpoints while recording or editing a test.
You can check an area of an application as a bitmap.
You can create a bitmap checkpoint for any area in your application, including
buttons, text boxes, and tables.
You can create bitmap checkpoints for TeWindow, TeScreen and TeTextScreen
Bitmap checkpoints check an area of your SAP Web application as a bitmap.
You can define a tolerance for the RGB (Red, Green, Blue) properties of a bitmap
checkpoint. Defining a tolerance determines the percent by which the RGB values
of the actual object are allowed to be different from those of the expected object
and allow the checkpoint to pass.
Bitmap checkpoints are supported for all add-in environments.
Existing Checkpoint: If each page of your application contains your organization's
logo, you can reuse a bitmap checkpoint to verify each occurrence in the
Last but not the least - The results of bitmap checkpoints may be affected by
factors such as operating system, screen resolution, and color settings.

63. What do you know about Output values?

64. What is existing checkpoint?

65. How do you declare a variable in VBScript?

66. Explain a variable?

67. Explain a statement?

68. Explain a procedure?
69. Explain a function?
70. What DataTable functions do you know?

Data Table is made up of three types of objects—DataTable, DTSheet (sheet),
and DTParameter (column). Each object has several methods and properties that
you can use to retrieve or set values.
Import - Imports the specified Microsoft Excel file to the run-time Data Table.
Export - Saves a copy of the run-time Data Table in the specified location.
GetRowCount - Returns the total number of rows in the longest column in the first
sheet in the run-time Data Table (global sheet). etc.

71. How do you find out what the length of the string is?

Len Function
Returns the number of characters in a string or the number of bytes required to
store a variable.

72. How do you convert the string to upper case?

UCase Function
Returns a string that has been converted to uppercase.

73. How do you declare an array?


74. How do you access an element of array?


75. What is an array?

76. What are the two ways to initialize an array?

77. How to load an excel file into QTP?


78. How to read cell data?

79. Explain regular expression?

80. What is a data-driven test case?

one which uses data table parameters.

81. What tables are used for data-driven test cases in QTP?

Global data table or Action data table.

82. Name different types of recording?


83. Explain when analog recording mode is used?


84. Explain the difference between Context and Analog mode?

Context is basically Normal mode.

85. Which record mode is used more, Context Sensitive or Analog?
I think you should answer this for yourself...should not be hard :-)

86. How to create a Runtime property for an object?
Is it really possible to create a runtime property? I think more than 20 cheap
websites/blogs copied this questions from here as it is without even knowing
whether it is rightly put or not and have not even answered it. Have you heard
about ObjectType() or something like this? what it does? etc etc..
See a Post and a Discussion for more info.

87. How to add a runtime parameter to a datasheet?

For example add the below two lines in a new test in QTP and run it. After a
successfull run, check you C: drive for excel file named flights.xls
ParamName=DataTable.AddSheet("MySheet").AddParameter("Arrival", "New
DataTable.Export ("C:\flights.xls")
For example add the below two lines in a new test in QTP and run it. After a
successfull run, check you C: drive for excel file named name.xls
DataTable.GlobalSheet.AddParameter "Name", "Sachin"
DataTable.ExportSheet "C:\name.xls" ,1

88. How many ways we can parameterize data in QTP?


89. What is the Diff between Image check-point and Bit map Check point
90. In how many ways we can add check points to an application using QTP.

You can manually add checkpoint to your test.
You can use CheckProperty.
You can use CheckItemProperty.
You can add a checkpoint while creating (recording) your test.
You can add a checkpoint while modifying (editing) your test and so on...is this the
end? what say?

91. How Does Run time data (Parameterization) is handled in QTP?

w.r.t. for example datatable, you can use DataTable object (which is The run-time
Data Table) and all its methods and properties etc. etc.

92. Give the reasons to use breakpoint?
1. suspend a run session and inspect the state of your application
2. mark a point from which to begin stepping through a component or function
library using the step commands

93. What is the Active screen?

Active Screen. Provides a snapshot of your application as it appeared when you
performed a certain step during the recording session.

94. Explain what is a test suite?

In software development, a test suite, less commonly known as a validation suite,
is a collection of test cases that are intended to be used to test a software program
to show that it has some specified set of behaviours. A test suite often contains
detailed instructions or goals for each collection of test cases and information on
the system configuration to be used during testing. A group of test cases may also
contain prerequisite states or steps, and descriptions of the following tests.

95. Tell whether Business Process Testing can be used for manual testing or not?

96. What is an Application Area?

The application area contains all of the required resource files and settings that
are specific to a particular area of the application being tested. Associating each
component with an application area enables the component to access these
resources and settings.

97. What is the custom object?

may be which are made according to the specifications of an individual application

98. What is the use of Add-Ins?

QuickTest Professional includes built-in support for testing standard
Windows applications. You can install and load add-ins from the QuickTest
Professional setup, enabling QuickTest to recognize objects in the
corresponding development environments and to provide functionality
appropriate for that environment.
When you work with these add-ins, you can use special methods, properties,
and various special options to create the best possible test or component for
your application.

99. What are the differences between Global sheet and Local sheet?

Global Data Table parameters take data from the Global sheet in the Data Table.
The Global sheet contains the data that replaces global parameters in each
iteration of the test. By default, the test runs one iteration for each row in the
Global sheet of the Data Table.
Local Data Table parameters take data from the action's sheet in the Data Table.
The data in the action's sheet replaces the action's Data Table parameters in each
iteration of the action. By default, actions run only one iteration.

100. When to use recovery scenarios?

Recovery scenarios are intended for use only with events that you cannot predict
in advance e.g Unexpected events, errors, and application crashes etc.

For More......

QTP Multiple Choice Questions Set 24 - Add-in

1) You can install the QuickTest...... add-ins (Web, ActiveX, Visual Basic) when you
install QuickTest Professional, or you can install the QuickTest built-in add-ins at a
later time by running the installation again.
A) internal
B) external
C) built-in
D) All of above

2) Add-ins that are installed separately from the QuickTest Professional
installation are referred to as ....... add-ins.
A) internal
B) external
C) built-in
D) built-out

3) When QuickTest opens, you can choose which of the installed add-ins you want
to load using the QuickTest Professional - ...... dialog box.
A) Add-In Window
B) Add-In
C) Add-In Manager
D) Add-In Management

4) Installing and Loading an Add-in is one and the same thing.
A) True
B) False

5) You can install Add-in Upgrade patches by running the relevant patch
executable from the \...... folder.
A) AddinsUpdate
B) AddinsUpgrade
C) Addins_upgrade
D) Both A & B

6) In Add-in Manager dialog box, Time-Limited column displays values only when
using a QuickTest seat license — not a concurrent license.
A) True
B) False

7) You can view the list of add-ins that are currently installed or loaded by
A) File > Settings
B) Tools > Options and click the General tab.
C) Help > About QuickTest Professional.
D) both A & B

8) To maximize performance and object identification reliability, load all the add-ins.
A) True
B) False

9) The add-in is displayed as Not Licensed in the License column of the Add-in
Manager dialog box:
A) If an add-in license has not yet been installed for a specific external add-in.
B) if no concurrent license server within your subnet has a registered license for
the specific add-in
C) if all concurrent licenses are in use
D) All of Above

10) You can use only one license type per session for Quick Test Professional and
all loaded add-ins-either seat or concurrent.
A) True
B) False

QTP Multiple Choice Questions Set 23 - Debug

1) To debug a function library, you must first associate it with a test and then 
debug it from that test.
A) True
B) False

2) To detect and isolate defects in a test or function library, you can control the run
session using the .... command
A) Pause
B) Run
C) F14
D) Session

3) When the test or function library run stops at a breakpoint, you can use the .....
to check and modify the values of VBScript objects and variables.
A) Debug Window
B) Debug Dialog
C) Debug Viewer
D) Debug page

4) While the test and function libraries are running in debug mode, they are read-only
A) True
B) False

5) You cannot debug a file that is called using an ...... statement, or any of the
functions contained in the file.
A) ExecuteFiles
B) Execute_File
C) Execute-File
D) ExecuteFile

6) The debug session can continue at the backend while you can perform file
operations like opening a new test etc.
A) True
B) False

7) Any changes you apply to external resources saved in the file system, such as
function libraries, are implemented only when the test is closed and reopened but
any changes you apply to any external resource that is saved in your Quality
Center project, such as a function library, will be implemented immediately.
A) True
B) False

8) You can use the .......... command to begin your debug session at a specific
point in your test.
A) Start from Step
B) Run to Step
C) Run from Step
D) Start to Step

9) You can specify the time (in milliseconds) QuickTest pauses between each step
by modifying the ..... option in the Run tab of the Options dialog box (Tools > Options).
A) Delay step execution by
B) Delay every step execution by
C) Delay all steps execution by
D) Delay each step execution by

10) To display the Debug toolbar, choose ............
A) View > Toolbar > Debug
B) View > Toolbars > Debugs
C) Views > Toolbar > Debug
D) View > Toolbars > Debug

QTP Multiple Choice Questions Set 22 - Recovery scenarios

1) Recovery scenarios activate specific recovery operations when ......... 
A) Specific Errors
B) Test Errors
C) Trigger Events
D) QTP Errors

2) You can also control and activate your recovery scenarios during the run 
session by inserting .............. into your test.
A) Trigger Events
B) Recovery Events
C) Recovery Statements
D) Catch Statements

3) If you choose On error in the Activate recovery scenarios box in the Recovery
tab of the Test Settings dialog box, the recovery mechanism does not handle
triggers that occur in the last step of a test.
A) True
B) False

4) By default, recovery scenario operations are activated only after a step returns an
A) True
B) False

5) A ....... is a convenient way to organize and store multiple recovery scenarios
A) recovery file
B) recovery folder
C) Recovery Log
D) Log File

6) The Recovery Scenario Manager dialog box enables you to create and edit
recovery files, and does not let you create and manage the recovery scenarios 
stored in those files.
A) True
B) False

7) Each recovery scenario is represented by an icon that indicates its type.
A) True
B) False

8) The Recovery Operations screen in Recovery Scenario Wizard enables
you to manage the collection of ........ in the recovery scenario.
A) recovery operations
B) recovery Files
C) Trigger events
D) All of Above

9) If you define a Restart Microsoft Windows recovery operation, it is always
inserted as the last recovery operation, and you can change its position in the list.
A) True
B) False

10) If more than one scenario uses a function with the same name from different
function libraries, the recovery process may fail.
A) True
B) False

QTP Multiple Choice Questions Set 21 - Virtual Objects

1) Virtual objects enable you to record and run tests on objects that are normally
recognized by QuickTest.
A) True
B) False

2) In the test results, the virtual object is displayed as though it is a standard class
A) True
B) False

3) QuickTest does not support virtual objects for ....... recording.
A) analog
B) low-level
C) normal
D) both A & B
E) both A & C

4) You can use the Object Spy to view virtual object properties.
A) True
B) False

5) You cannot insert any type of checkpoint on a virtual object
A) True
B) False

6) The ............ contains all the virtual object collections defined on your computer.
A) Virtual Objects Manager
B) Virtual Manager
C) Virtual Object Manager
D) Virtual Object Wizard

7) Extention of virtual object collection files
A) .vcf
B) .vot
C) .vct
D) .vcd

8) You can remove virtual objects from your test by ....... these objects.
A) disabling recognition of
B) deleting
C) deleting virtual object collection files of
D) All of Above
E) both A & B

9) When you want QuickTest to recognize virtual objects during recording, ensure
that the ....... check box in the General tab of the Options dialog box is cleared.
A) Disable recognition of virtual object Files while recording
B) Disable recognition of virtual object Collection while recording
C) Disable recognition of virtual objects while recording
D) Enable recognition of virtual objects while recording

10) QuickTest identifies a virtual object according to its ......
A) Properties
B) boundaries
C) Object Spy
D) Edges