QTP Interview Questions and Answers
1) Explain about your Company’s Automation Framework?
2) What are the important factors in test tool selection?
a. Technical factors:
i. Nature of the AUT (Application Under Test)
ii. Tool Features (Facilities available)
iii. Availability of Skilled professionals
iv. Organizations experience
v. Technical support from vendor
b. Business factors:
ii. Vendor’s Reputation
iii. Client’s Interest
3) What test cases can be automated?
Test cases that we want to execute on number of versions of the software
Ex: Regression test cases
Test cases that we want to execute with multiple sets of data
Ex: Data driven test cases
Test cases having complex functionality
4) What test cases cannot be automated?
o Dynamically changing functionality
o Test cases that require more Human interaction
o CUI (command user interface) based test cases
5) Explain about the Testing process in QTP?
o Analyzing the Application
o Automation Framework Implementation
o Selecting/Generating Test cases for Automation
o Collecting Test Data
o Configuring Tool Settings
Generating the basic tests
Using Object Repository method or using Descriptive Programming, we can generate Tests
With respect to our project requirements, we have to enhance our tests. For enhancing tests QTP is providing various features like:
o Inserting Transaction points
o Inserting VB script Flow Control statements
o Adding comments
o Calling Functions/ calling Actions
o Using Environment variables
o Entering Regular Expressions
o Inserting Checkpoints
o Inserting Output values
Note: For any Test all enhancement methods not required.
Debugging Tests (if required)
It is optional; basically scripting languages are Light weight languages, no need to compile them separately. During execution Scripts can be compiled and Run.
If we have any doubts about some scripts, then we can execute them step by step with the support of VBScript Debug commands and Break points
Generally, many companies are using Framework feature for Running Tests.
QTP Supports Individual Test execution, Batch execution, Tests execution through AOM Scripting, and Scheduled execution with the support of Windows Operating system.
It is not the Responsibility of QTP; Test engineer has to do this manually.
QTP is providing Result window in XML format.
QTP is providing Result deletion tool also.
QTP is providing Test results exporting facility. It supports HTML, Word document and PDF (portable document format) formats.
Reporting defects also not a QTP responsibility that we have to do manually after analyzing the results, but if we are using Quality Center, from QTP result window we can send defects directly.
6) Explain about the object identification configuration process in QuickTest?
7) What types of License available for QTP?
a) Seat License or Node locked:
Fixed for one System (Machine), we can use from that System only
b) Concurrent License or Floating License:
This License, we can use from different Systems but one at a time
8) How to generate Basic scripts/tests from Manual Test cases in QTP?
For generating basic tests QTP is providing 1) Object repository 2) Descriptive Programming
a) Object repository:
Recording (Local Repository)
And/or Shared object Repository
b) Descriptive programming or Programmatic Descriptions
9) What is the difference between Local and Shared object Repository?
Local: QTP creates a Local Repository for every Action during Recording automatically
It can’t be shared among other tests
It’s a QTP internal file
Users no need to maintain separately (auto save)
Extension is .mtr – (mercury test repository/module test repository)
Shared: User creates shared repository by adding objects
That can be shared among number of tests
User has to maintain shared object repository files
Extension is .tsr – (test shared repository)
10) How to maintain objects in Object Repository?
Same as above 9th
11) What is Synchronization?
It is a process of matching the speeds of both QTP and AUT in order to get proper execution and results
12) How to synchronize QTP and AUT?
For synchronizing QTP and AUT, QTP is providing below methods (features)
o Wait statements
o Synchronizations points
o Increasing tool default synchronization time (Increase timeout)
o Sync method (Only for web)
o Using Exit property also we can use (GUI and web) – Limited usage
13) How to parametrize tests?
It is a process of passing parameters for replacing constant values. In QTP several methods are available
a. Through Looping : Here some limitations are there :
We can use Looping for sequential numbers and logical numbers only, if it is a string we can’t use.
b. Through Data table
c. Fetching test data directly from external files (excel, flat files)
d. Fetching test data directly from databases
e. Fetching data from AUT objects (front-end objects)
14) How to Generate Non-recordable steps?
Using Step Generator, we can generate non recordable steps
15) What are the benefits of Step Generator?
It’s a library of functions and utility objects. Through this we can generate recordable and non recordable steps, utility statements and built in functions.
16) How to count Links in a web page without using page checkpoint?
Using Description object and Childobjects method
17) How to count all available objects in a dialog box /a window/a web page?
Using Childobjects method
18) What are the major disadvantages in record tests?
o It occupies a lot of memory space due to this, QTP performance will be reduced
o Modifications are very difficult
o User may not have command on the script, if any modifications are there user may not understand properly
o Recorded scripts are QTP internal files, they may corrupt.
19) What are the disadvantages in using of checkpoints?
o They are QTP internal files we can’t use in external functions
o As they are QTP internal files they may corrupt
o As it is ready made feature, that has limited usage
20) In QuickTest Pro can we insert Checkpoints programmatically? How?
Yes. We can insert checkpoints programmatically with the help of GetRoProperty method.
21) What are Differences between Design time Data Table and Run-time Data Table?
Design Time Data Table:
It is viewed in the QTP Main Test
It is created prior to the test execution
It represents data from external Sources
Run-Time Data Table:
It is viewed in the QTP Test Result Window
It is created in Test Results after test execution.
It represents a live version of design Time Data table.