Latest QTP Interview Questions and Answers

Read Top QTP Interview Questions and Answers Experienced, Freshers for Job Interview Quiz with Solutions.

What can be done if requirements are changing continuously?

A common problem and a major headache.
• Work with the project’s stakeholders early on to understand how requirements might change so that alternate test plans and strategies can be worked out in advance, if possible.
• It’s helpful if the application’s initial design allows for some adaptability so that later changes do not require redoing the application from scratch.
• If the code is well-commented and well-documented this makes changes easier for the developers.
• Use rapid prototyping whenever possible to help customers feel sure of their requirements and minimize changes.
• The project’s initial schedule should allow for some extra time commensurate with the possibility of changes.
• Try to move new requirements to a ‘Phase 2’ version of an application, while using the original requirements for the ‘Phase 1’ version.
• Negotiate to allow only easily-implemented new requirements into the project, while moving more difficult new requirements into future versions of the application.
• Be sure that customers and management understand the scheduling impacts, inherent risks, and costs of significant requirements changes. Then let management or the customers (not the developers or testers) decide if the changes are warranted – after all, that’s their job.
• Balance the effort put into setting up automated testing with the expected effort required to re-do them to deal with changes.
• Try to design some flexibility into automated test scripts.
• Focus initial automated testing on application aspects that are most likely to remain unchanged.
• Devote appropriate effort to risk analysis of changes to minimize regression testing needs.
• Design some flexibility into test cases (this is not easily done; the best bet might be to minimize the detail in the test cases, or set up only higher-level generic-type test plans)
• Focus less on detailed test plans and test cases and more on ad hoc testing (with an understanding of the added risk that this entails).

How can it be known when to stop testing?

This can be difficult to determine. Many modern software applications are so complex, and run in such an interdependent environment, that complete testing can never be done. Common factors in deciding when to stop are:
• Deadlines (release deadlines, testing deadlines, etc.)
• Test cases completed with certain percentage passed
• Test budget depleted
• Coverage of code/functionality/requirements reaches a specified point
• Bug rate falls below a certain level
• Beta or alpha testing period ends.

How many types of recording facility are available in QuickTest Professional (QTP)?

QTP provides three types of recording methods-
* Context Recording (Normal)
* Analog Recording
* Low Level Recording

How many types of Parameters are available in QuickTest Professional (QTP)?

QTP provides three types of Parameter-
* Method Argument
* Data Driven
* Dynamic

How to Start recording using QuickTest Professional (QTP)?

Choose Test > Record or click the Record button.
When the Record and Run Settings dialog box opens to do this;
1. In the Web tab, select Open the following browser when a record or run session begins.
2. In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that there are no applications listed.

How to do Load testing for web based Application?

  1. Recording a scenerio in QTP of my web based application.
    2. Make 100 copies of that scenerio and run the test (scenerio run for 100 times)
    3. In that case, do the load of application on server.
    4. The basic logic of running the copy 100 times is to create same scenerio as if 100 users were working.

How to supress warnings from the “Test results page”?

the Test results Viewer “Tools > Filters > Warnings”…must be “Unchecked”.

What’s Checkpoints for QuickTest Professional (QTP)?

A checkpoint verifies that expected information is displayed in your application while the test is running.

What’s QuickTest Professional (QTP Window)?

Before you begin creating tests, you should familiarize yourself with the main QuickTest window.
The QuickTest window contains the following key elements:
Title bar—Displays the name of the currently open test.
Menu bar—Displays menus of QuickTest commands.
File toolbar—Contains buttons to assist you in managing your test.
. Testing toolbar—Contains buttons to assist you in the testing process.
Debug toolbar—Contains buttons to assist you in debugging tests.
Test pane—Contains the Keyword View and Expert View tabs.
Active Screen—Provides a snapshot of your application as it appeared when you performed a certain step during the recording session.
Data Table—Assists you in parameterizing your test.
. Debug Viewer pane—Assists you in debugging your test. The Debug Viewer pane contains the Watch Expressions, Variables, and Command tabs. (The Debug Viewer pane is not displayed when you open QuickTest for the first time. You can display the Debug Viewer by choosing View < Debug Viewer.)
Status bar—Displays the status of the QuickTest application

How to proceed with QTP when QTP doesnt idenify the object? When a object is not being recognised by QTP, what is the work around so that you can continue with automation?

Try to identify why object is not getting recognized. Like some of the properties used to identify the object may change dynamically. Try using regular expression or try to supply the value from the datatable2. As suggested earlier … Try using ordinal.

What is the advantage of using shared object repository in QTP?

Advantages of Share Repository: 1) Re-usablility : Same Repository can be used with any number of Actions/Test Scripts 2) Easy to maintain and update : If you are using Share repository and any one of the Object Property in your application.

When ordinal identifiers alone can make an object unique then why they are not given top priority? Why it is first mandatory and next assitive. Why we cannot go for ordinal identifiers directly?

It will consume more time that ‘s the reason.

By default, how many number of tables would be there in a script? a) One b) Two c) Three d) Four?

If you mean datatable, by default it will be just one.This one data table will contain the global sheet and one sheet for each action in the script

Identify the recording mode, by which you can record the non-standard object in QTP A) Standard recording B) Analog recording C) Low level recording D) None ?

If QTP does not recognize an object it is called as non-standard object in QTP, that is those objects are not present in the object repository of the QTP, in this case we generally go for the low level recording.

How will you update script for changed functionality?

If the functionality changes you will anyways have to write the new script… If the properties change yes you can update them to OR.what does changed functionality mean anyway.

What are the prerequisites to connect QTP with QC?

1. You need to install the QC add-in for QTP. Go to the QC add-in page (the More HP QC Add-ins page) and select and install the QTP add-in. If you do not do this you can not connect QC and QTP also you require this add-in to run QTP test from QC directly.

What is the difference between ‘Recovery Scenario’ and ‘On Error Resume Next’?

Recovery Scenario: When Unexpected events, errors, and application crashes during a run session can disrupt your run session and distort results.

On error Resume Next: When you want to flip the error control switch to the off position.

What is the significance of regular expression in QTP?

Also Regular Exp is used for pattern matching and replacing of a string.* : Matches the preceding character zero or more times.. : Matches any single character except a newline character.

What are the limitations of QTP encountered while Automating Share Point application?

Few limitations of QTP:

1.Not advisable for unstable systems.

2.Does not support Ad-hoc testing.

3.Does not support validation testing.

4.Cannot be used to compare pdf and word files. …

Image Validation is not supported by which automation tool a) QTP b) Winrunner c) Both of the above ?

QTP Supports Image validation.But image checkpoint checks only for image properties ( image file name, image size..etc.).We can use bitmap check point to compare the image pixel by pixel.

What is Hybrid Framework and how it is useful? How will you implement hybrid framework in a project?

Test automation framework is a set of assumptions, concepts and practices that provide support for automating your scripts the Hybrid Test Automation Framework incorporates features of Script modularity, Functional Decomposition and Data Driven framework. …

How do we decide as to which recording mode from Context Recording (Normal), Analog Recording or Low Level Recording do we select for an application? What is uniqueness in each recording mode?

1) Normal recording is also known as context sensitive recording. This is the
default recording mode in QTP which is used to record the operations on
standard GUI objects. For each and every operation it generates (statement)

2) In analog recording we will record mouse and keyboard operations with
respect to window or desktop co-ordinates. Here it generates single statement
for all operations.


a) If you take desktop coordinates u may get wrong output if the application is
moved from one place to another.

b) If you take window coordinates you will get the correct output even the
application is moved from one place to another.

3) Low level recording is used to record the operations on the objects which
are not recognised by the QTP.

Recording Type Function Keys from Keyboard
Normal Recording – F3
Analog – CTRL + SHIFT + F4
Low Level – CTRL + SHIFT + F3

When do you use analog recording to record a test?

Enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. In this recording mode, QuickTest records and tracks every movement of the mouse as you drag the mouse around a screen or window.

This mode is useful for recording operations that cannot be recorded at the level of an object, for example, recording a signature produced by dragging the mouse.
Note: You cannot edit Analog Recording steps from within QuickTest

How to copy a datatable content from globalsheet to localsheet (action1)?

At runtime you can coopy the data from Global sheet to Loca Sheet(Action1) in following sequence:-

1) Export the data of Global sheet to some temporary excel (for eg C:Test1.xls)

2) Import the data of this temp excel to Action1 datatable as

This code is not tested,  but it should work this way.

For what purpose step generator is used?

The Step Generator enables you to add steps quickly and easily by selecting from a range of context -sensitive options amd entering the required values. In the Step Generator dialog box you can define that use*

Test Object and Properties
* Utility Object methods and properties
* Calls to library functions VBScript functions and internal script functions.

For Ex: You can add a step that checks that an object exists or that stores the returned value of a method as an output value or as part of a conditional statement. You can parameterize any of the values in your step.

How to parametrize through environment. Please use a suitable example?

Just a add on…You can also put all common variables  in an external xml file  and import  it  into  the  QTP  to be used  across all  tests.The structure  of  XML  file would be: …

How to make QTP understand the difference with same type of objects

Use the Ordinal identifiers (index) property…each of the objects will have a different index value

 QTP identifies the object in following manner-

1) First with mandatory and assistive property. If these are not sufficient
then “Ordinal Identifier”

2) By using “Smart Identification“.

In your case you have different object of same type. First they have
different names so object will be identified easily.

If there are more than one object with the same name than use “Ordinal
Identifier – Index”.

With “Index” property object will be identified

We can use the descriptive programming for identifying the 6th checkbox from a bunch of checkboxes on a page

Dim obj_ChkDesc

Set obj_ChkDesc Description.Create
obj_ChkDesc(“html tag”).value “INPUT”
obj_ChkDesc(“type”).value “checkbox”

Dim allCheckboxes

Set allCheckboxes Browse(“Browser”).Page(“Page”).ChildObjects(obj_ChkDesc)

allCheckboxes(5).Set “ON”

As index value start from the value ‘0’ so 6th object is having index value ‘5’

Where do checkpoints get stored?

Object Repository

If the question is about checkpoint properties then the
answer is files

If the question is about after executing the checkpoint
then the answer is Action#ResultFolder.

What is the function of ADD Ins in QTP?

QTP Add-in is to identify the object-type in the AUT(Application under test).
By default QTP supports 3 add-ins
a. Visual Basic
b. Web
c. Active-X

If you de-select web add-in and then record a test. Then obeject identifiers will fail to recognise web-objects.

Other supported Add-in’s are:
TE(Terminal Emulator)
may more……

How will you analyse results in QTP?

Expand the Tree format of Test Result window and check all the below

After you run a test the Test Results window displays all aspects of the run session including:

1.a high-level results overview report (pass/fail status)

2.the data used in all runs expandable tree of the steps specifying exactly where application failures occurred

4.the exact locations in the test where failures occurred

5.a still image of the state of your application at a particular step

6.a movie clip of the state of your application at a particular step or of the entire test

7.detailed explanations of each step and checkpoint pass or failure at each stage of the test

What is the difference between DIM and SET? When to use DIM and when to use SET?

Dim can be used to store a value in a variable.
For example: Dim a
a 10

       Set can be used to store a object or child object from AUT
eg. set a Browser(” “).Page(” “).childobject(obj)
obj is already described through descriptive programming & by using above script we can store      child objects in a web page like webbutton webradio button web list link etc

How to write and where we call user defined functions in QTP? Give an example?

Using QuickTest you can define and store your user-defined functions either in a function library (saved as a .qfl file by default) or directly in an action within a test. A function library is a Visual Basic script containing VBscript functions subroutines modules and so forth. You can also use QuickTest to modify and debug any existing function libraries (such as .vbs or .txt files).

When you store a function in a function library and associate the function library with a test the test can call the public functions in that function library. Functions that are stored in an associated function library can be accessed from the Step Generator (for tests and function libraries) and the Operation column in the Keyword View as well as being entered manually in the Expert View.

When you store a function in a test action it can be called only from within that action—the function cannot be called from any other action or test. This is useful if you do not want the function to be available outside of a specific action.

You can also define private functions and store them in a function library. Private functions are functions that can be called only by other functions within the same function library. This is useful if you to reuse segments of code in your public functions.

We can write user define functions in QTP Editor or in notepad also. when we write funtions in notepad we have to save file with .vbs extention. and close notepad then we can use that file in qtp resources. in resources we give notepad file path. than we can use funtion directly by functions name….

How to use Regular Expression i am opening the google page with scripting and now using regular expression i want to enter browser and page name of google to enter the search text and search.?

browser(“title: .*Google.*”).Page(“title: .*Google.*”).webedit(“Search”).set “Test Search”

browser(“title: .*Google.*”).Page(“title: .*Google.*”).webbutton(“Search”).click

This is not something which will directly work by copy paste but just to give you an idea of the concept.

Which is the Default Identifier: Index, Location, Creation Time?

For windows applications we can select index or location
For web applications we can select loading time

Parametrization using file How do we input values from file ?

Generally QTP exports uses Excel file for data paramaterization.
1)Prepare test data in Excel sheet and import into QTP data table. Using DataTable methods user can easily parameterize data and access them through out the script.
DaTaTable Methods: Import ImportSheet Export ExportSheet GetSheet SetCurrentRow SetNextRow etc…


DataTable.Import “Excel file path”
testData DataTable(columnName Sheetname)
testData DataTable(columnName dtGlobalSheet)

2)Prepare test data in Excel sheet. Instead of importing Excel file/sheet into Test script create an Excel object in the script using CreateObject method. Using Excel object methods user can able access data from excel sheet.

Set ExcelObj CreateObject(“Excel.Application”)
ExcelObj.WorkBooks.Open “Excel file path” false false
Set currentWorkSheet ExcelObj.ActiveWorkBook.WorkSheets(1) ‘first sheet
testData currentWorkSheet.Cells(rownumber columnnumber).Value

How to capture and display text check point value in message box without using o/p checkpoint?

Store display text in object repository and use the following code to read text

Msgbox Brpwser(“Browser”).page(“Page_Name”).webelement(“text”).GetROProperty(“innertext”)

where “innertext” is property of the display text.

How do we count links on the web page displayed?

Set LinkDesc Description.Create ()

LinkDesc( micclass ).value Link

LinkDesc( html tag ).value A

set Links Browser( QTP – Google Search ).Page( QTP – Google Search ).ChildObjects(LinkDesc)

Msgbox Links.Count

How to delete 10 first mails by using qtp?

Browser(“Yahoo!”).Page(“Yahoo!”).Link(“Mail”).Click Browser(“Yahoo!”).Page(“Yahoo! Mail: The best”).WebEdit (“login”).Set “venkat.kumar”  Browser(“Yahoo!”).Page(“Yahoo! Mail: The best”).WebEdit (“password”).SetSecure “password” Browser(“Yahoo!”).Page(“Yahoo! Mail: The best”).WebButton (“Sign In”).Click Browser(“Yahoo!”).Page(“(10 unread) Yahoo! Mail”).Link (“Inbox (10)”).Click

For i 1 to 10

b Browser(“Yahoo!”).Page(“Inbox (10) – Yahoo! Mail”).webtable(“inbox(10)”).ChildItem               (i 1 “WebCheckBox” 0).Set “ON”
Next b.Delete

What is difference between client/sever , web server application in Testing Point of view?

1.Client server applications have a controlled client.
web applications are client server applications. The browser is a client and the webserver is a server
2. Client server application is loaded at the server and in every client machine an exe is loaded to call the application.
3.Client server systems works within a company’s intranet & may be obscure enough that none tries to hack it or even cares to.

1.Web applications: these are tested with many different client versions and configurations.
2. Applicationm is loaded at the server but no exe is installed at the client machine we have to call the application through browser.
3.Web applications are exposed to the open internet.

How to call QTP from Quality Central?

In General Users upload test scripts into Test Plan module in QC.

open the script in QTP through QC

1)Goto Test Plan

2) Click on the test script you want to review Test script will be opened in Right pane of the screen

3) There you can find QTP Tool symbol. Click on it… Automatically QTP opens along with that script

If you want to execute test script from QC

1) Goto test lab create testset

2) Add test script into it and Click on Run button and test script will be executed from QC

What is the difference between New and Open bug? Who is responsible for changing the phase of bug from New to Open?

When a tester found a bug in a software during testing and the bug is verified by the T.L. then it is called the ” New”state of a bug.
When the Testing Lead sent the bug to Development Lead for modification and it is verified by the D.L. it is called the “Assigned” state of a bug.
The bug is then transferred to development team to fix it. The developer open the bug it is called the “Open” state of a bug.

What more status can you give to a test case other than pass, fail, not run & blocked?

– After finding the bug..first we have to give NEW status..
– then after QA consolidation..he will alot OPEn status
– he will assign to corresponding developer
– after fixation of the bug he will give the statusa VERIFIED
– after finilizing the bug developer send to testing team
– if the bug is really geniun w e have to give the status CLOSE
– if not properly rectify..then we should give the status REOPEN……

If i miss a important bug and i realise it very late then what will i do?

When your approach towards the testing task is really systematic there is no question of missing important bug araises. still i would prefer to answer your question.

If you really come to know that you have missed an important bug while reporting them Then you should react according to your cadre i.e. if you are a team member of a testing team then you should report the same to your Team Leader and he should take the necessary action for reporting that bug.

OR if your work environment permits you to report it to the concerned person then you should Log that bug and should check for the same in the relevant build


Popular posts from this blog

TOP Agile Testing Interview Questions and Answers

Latest Agile Testing Interview Questions and Answers

Most Asked ADO.NET Interview Questions and Answers