Anda di halaman 1dari 13

software testing help

 home
 about
 articles
 contact
 jobs
 Glossary
 Resources
 Books
← How to prepare for software testing interview

How to build a successful QA team? →

Learning basics of QTP automation tool


and preparation of QTP interview
questions
Posted In | QTP, Questions & answers, Testing Interview questions, Automation Testing

This post is in continuation with QTP interview questions series. Following


questions will help for preparing interview as well as learning the QTP
basics.
Quick Test Professional: Interview Questions and answers.
1. What are the features and benefits of Quick Test Pro(QTP)?
1. Key word driven testing
2. Suitable for both client server and web based application
3. VB script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features
2. How to handle the exceptions using recovery scenario manager in
QTP?
You can instruct QTP to recover unexpected events or errors that occurred in
your testing environment during test run. Recovery scenario manager provides a
wizard that guides you through the defining recovery scenario. Recovery
scenario has three steps
1. Triggered Events
2. Recovery steps
3. Post Recovery Test-Run
3. What is the use of Text output value in QTP?
Output values enable to view the values that the application talks during run
time. When parameterized, the values change for each iteration. Thus by
creating output values, we can capture the values that the application takes for
each run and output them to the data table.

4. How to use the Object spy in QTP 8.0 version?


There are two ways to Spy the objects in QTP
1) Thru file toolbar: In the File ToolBar click on the last toolbar button (an icon
showing a person with hat).
2) Thru Object repository Dialog: In Objectrepository dialog click on the button
“object spy…” In the Object spy Dialog click on the button showing hand symbol.
The pointer now changes in to a hand symbol and we have to point out the
object to spy the state of the object. If at all the object is not visible or window
is minimized then hold the Ctrl button and activate the required window to and
release the Ctrl button.
5. What is the file extension of the code file and object repository file in
QTP? 
File extension of
Per test object rep: filename.mtr
Shared Object rep: filename.tsr
Code file extension id: script.mts
6. Explain the concept of object repository and how QTP recognizes
objects?
Object Repository: displays a tree of all objects in the current component or in
the current action or entire test( depending on the object repository mode you
selected).
we can view or modify the test object description of any test object in the
repository or to add new objects to the repository.
Quicktest learns the default property values and determines in which test object
class it fits. If it is not enough it adds assistive properties, one by one to the
description until it has compiled the unique description. If no assistive properties
are available, then it adds a special Ordianl identifier such as objects location on
the page or in the source code.
7. What are the properties you would use for identifying a browser and
page when using descriptive programming?
“name” would be another property apart from “title” that we can use. OR
We can also use the property “micClass”.
ex: Browser(”micClass:=browser”).page(”micClass:=page”)
8. What are the different scripting languages you could use when
working with QTP?
You can write scripts using following languages:
Visual Basic (VB), XML, JavaScript, Java, HTML
9. Tell some commonly used Excel VBA functions.
Common functions are:
Coloring the cell, Auto fit cell, setting navigation from link in one cell to other
saving
10. Explain the keyword createobject with an example.
Creates and returns a reference to an Automation object
syntax: CreateObject(servername.typename [, location])
Arguments
servername:Required. The name of the application providing the object.
typename : Required. The type or class of the object to create.
location : Optional. The name of the network server where the object is to be
created.
11. Explain in brief about the QTP Automation Object Model.
Essentially all configuration and run functionality provided via the QuickTest
interface is in some way represented in the QuickTest automation object model
via objects, methods, and properties. Although a one-on-one comparison cannot
always be made, most dialog boxes in QuickTest have a corresponding
automation object, most options in dialog boxes can be set and/or retrieved
using the corresponding object property, and most menu commands and other
operations have corresponding automation methods. You can use the objects,
methods, and properties exposed by the QuickTest automation object model,
along with standard programming elements such as loops and conditional
statements to design your program.

12. How to handle dynamic objects in QTP?


QTP has a unique feature called Smart Object Identification/recognition. QTP
generally identifies an object by matching its test object and run time object
properties. QTP may fail to recognize the dynamic objects whose properties
change during run time. Hence it has an option of enabling Smart Identification,
wherein it can identify the objects even if their properties changes during run
time.
Check out this: 
If QuickTest is unable to find any object that matches the recorded object
description, or if it finds more than one object that fits the description, then
QuickTest ignores the recorded description, and uses the Smart Identification
mechanism to try to identify the object.
While the Smart Identification mechanism is more complex, it is more flexible,
and thus, if configured logically, a Smart Identification definition can probably
help QuickTest identify an object, if it is present, even when the recorded
description fails.
The Smart Identification mechanism uses two types of properties: 
Base filter properties - The most fundamental properties of a particular test
object class; those whose values cannot be changed without changing the
essence of the original object. For example, if a Web link’s tag was changed from
to any other value, you could no longer call it the same object. Optional filter
properties - Other properties that can help identify objects of a particular class
as they are unlikely to change on a regular basis, but which can be ignored if
they are no longer applicable.
13. What is a Run-Time Data Table? Where can I find and view this
table?
In QTP, there is data table used, which is used at runtime.
-In QTP, select the option View->Data table.
-This is basically an excel file, which is stored in the folder of the test created, its
name is Default.xls by default.
14. How does Parameterization and Data-Driving relate to each other in
QTP?
To data driven we have to parameterize. i.e. we have to make the constant
value as parameter, so that in each interaction(cycle) it takes a value that is
supplied in run-time data table. Through parameterization only we can drive a
transaction (action) with different sets of data. You know running the script with
the same set of data several times is not suggested, and it’s also of no use.

15. What is the difference between Call to Action and Copy Action.?
Call to Action: The changes made in Call to Action, will be reflected in the
original action (from where the script is called). But where as in Copy Action ,
the changes made in the script ,will not effect the original script(Action)

16. Explain the concept of how QTP identifies object.


During recording qtp looks at the object and stores it as test object. For each
test object QT learns a set of default properties called mandatory properties, and
look at the rest of the objects to check whether this properties are enough to
uniquely identify the object. During test run, QTP searches for the run time
objects that matches with the test object it learned while recording.

17. Differentiate the two Object Repository Types of QTP.


Object repository is used to store all the objects in the application being tested.
Types of object repository: Per action and shared repository.
In shared repository only one centralized repository for all the tests. where as in
per action for each test a separate per action repository is created.
18. What the differences are and best practical application of Object
Repository?
Per Action: For Each Action, one Object Repository is created.
Shared: One Object Repository is used by entire application
19. Explain what the difference between Shared Repository and Per
Action Repository
Shared Repository: Entire application uses one Object Repository , that similar
to Global GUI Map file in WinRunner
Per Action: For each Action, one Object Repository is created, like GUI map file
per test in WinRunner
20. Have you ever written a compiled module? If yes tell me about some
of the functions that you wrote.
Sample answer (You can tell about modules you worked on. If your answer is
Yes then You should expect more questions and should be able to explain those
modules in later questions): I Used the functions for Capturing the dynamic data
during runtime. Function used for Capturing Desktop, browser and pages.

21. Can you do more than just capture and playback?


Sample answer (Say Yes only if you worked on): I have done Dynamically
capturing the objects during runtime in which no recording, no playback and no
use of repository is done AT ALL.
-It was done by the windows scripting using the DOM(Document Object Model)
of the windows.
22. How to do the scripting. Are there any inbuilt functions in QTP?
What is the difference between them? How to handle script issues?
Yes, there’s an in-built functionality called “Step Generator” in Insert->Step-
>Step Generator -F7, which will generate the scripts as you enter the
appropriate steps.

23. What is the difference between check point and output value?
An output value is a value captured during the test run and entered in the run-
time but to a specified location.
EX:-Location in Data Table[Global sheet / local sheet]
24. How many types of Actions are there in QTP?
There are three kinds of actions:
Non-reusable action - An action that can be called only in the test with which it
is stored, and can be called only once.
Reusable action - An action that can be called multiple times by the test with
which it is stored (the local test) as well as by other tests.
External action - A reusable action stored with another test. External actions are
read-only in the calling test, but you can choose to use a local, editable copy of
the Data Table information for the external action.
25. I want to open a Notepad window without recording a test and I do
not want to use System utility Run command as well. How do I do this?
You can still make the notepad open without using the record or System utility
script, just by mentioning the path of the notepad “( i.e. where the notepad.exe
is stored in the system) in the “Windows Applications Tab” of the “Record and
Run Settings window.

Don’t want to miss any software testing tip! Subscribe via Email.

Email this • Add to del.icio.us • Subscribe to this feed


Automated Testing Interview Questions - Mercury QuickTest Professional

General knowledge or software automation is your best guide when you


answer these QTP questions:

1. How to create basic scripts from a manual test case in QTP?


2. How to add verification steps to tests?
3. How to use custom checkpoints in QuickTest Professional?
4. How to use database checkpoints?
5. How to manage objects in the Object Repository in QuickTest
Professional?
6. How to parameterize tests?
7. How to customize checkpoints with parameters?
8. How to run an integrated test scenario using Multiple Actions?
9. How to use the QTP Step Generator?
10.How to use debug tools?
11.How to create virtual objects?
12.What is the difference between QTP Analog and Low-Level recording
modes?
13.Please describe Object and Smart Identification?
14.What is the difference between Per-Action vs. Shared Object
Repositories?

Ask yourself the following questions that covers the basics of the QTP
functionality:

1. What are the main benefits of QuickTest Professional?


2. What is Add-In Manager in QTP?
3. What QTP Options do you know?
4. How to Identify Objects and their Properties?
5. What is the Object Repository?
6. How to Add Synchronization Steps?
7. How to Set the Global Sync Timeouts in QTP?
8. What is Regular Expressions and how to use them?
9. How to Create Data-Driven tests?
10.What are Checkpoints with Parameters?
11.What is the difference between Global and Local Data Sheets?
12.How to create Reusable and Multiple Actions?
13.Describe the benefits of the Step Generator.
14.What are the main options that are available in the Step Generator
dialog box?
15.What is Exception Handling?
16.What is Recovery Scenario Wizard in QTP?
17.Describe the purpose of a Database Checkpoint
18.What is the difference between Analog Recording and Low-Level
Recording in automation tools?
19.Describe Per-Action vs. Shared Object Repositories
20.Describe how and when Smart Identification is used

Do you know the answer to the following more advance questions?

1. Please identify when the Expert View is useful.


2. How can we translate the steps between the Keyword and Expert
Views?
3. How software automation specialist enter steps in the Expert View?
4. How can you retrieve an object's properties?
5. How software tester can use constants and variables in scripts?
6. How can you write the scripts that operate on different objects
depending on run-time information?
7. How QA specialist can identify when programmatic descriptions are
useful?
8. What VBScript operators, functions, and statements do you use in
QuickTest Professional?
9. How to retrieve data from application objects?
10.Please list some VBScript looping statements and explain when each is
useful.
11.How to use the DataTable object to store run-time data and drive
actions?
12.How to build scripts that access data from external sources?
13.How can you create new subroutines and functions?
14.How we can build a new and associate library of functions?
15.Please identify when to handle run errors programmatically.
16.What are the main ways of managing QTP run errors?
17.Did you use abort loops, procedures, iterations, actions, and runs?

Detailed QTP questions with answers. Some of them were used for Mercury
QTP certification.

1. What is the purpose of loading an add-in? 


answer: To enable QTP to recognize objects of your applications.
2. What does the Missing Resources pane show? 
answer: Missing of any external function or repository
3. During designing a test, what do you need to take into account to ensure
that the test can be reiterated? 
answer: Set initial and end conditions as part of the test,
4. How do you determine whether a test failed or passed? 
answer: Go to the result screen and check
5. What does the export Test to Zip feature do?
6. What is the object class?
7. What is the step to change the logical name of the object recorded by
QTP? 
answer: Open the Object Repository.
8. What is Object Spy used for? 
answer: View the runtime object methods and properties.
9. When QuickTest Pro enable you to specify a synchronization points? 
answer: While recording a test and after recording a test
10.What is the function of a synchronization point? 
answer: To provide more time for an object to process before moving to
the next step in a test.
11.What can you use a synchronization point for? 
answer: To provide more time for an object to process in the real
environment.
12.When QTP enable you to specify a synchronization points? 
answer: While recording and after recording a test
13.Why do you use regular expressions in your test? 
answer: To define a checkpoint that can accept a range of values.
14.How do you determine if a checkpoint is use in a test? 
answer: 1. A checkmark appears next to the step in the results. 2. The
OPERATION column of KEYWORD VIEW lists the operation as
CHECK 3. A check mark appears at each level of the Test Summary
tree.
15.What is standard checkpoint? 
answer: A mechanism to check the property of an object.
16.How many ways we have to set checkpoints? 1. In the recording mode 2.
In the insert mode in keyword view screen (right mouse click) 3. In an
active screen mode
17.What is the purpose of the input parameters? 
answer: Drives a variety of data values through a test.
18.How can you make a checkpoint flexible? 
answer: Create and insert a regular expression or input data to the
parametr using the design-time Data Table
19.Which action can you use only within the test which it was created? 
answer: Regular action; Regular (non – reusable) action; External
action.
20.Where do you set action iterations for the specified action? 
answer: Action Call Properties
21.What is created by default with a new action? 
answer: Local object repository, Local data sheet and Folder (tree
structure)
22.What is Step generator used for? 
answer: Function and object listing
23.Which field in the Step Generator dialog box is optional, depending on
the object and operation? 
answer: Document step
24.How can you insert the ReportEvent feature? 
answer: Using New step or Step generator.
25.In which dialog box do you check Web to load add-ins for a Web
application? 
answer: In Add-in manager.
26.Why do you create a text checkpoint on a Web application?
27.When do we use custom checkpoints? 
answer: Standard checkpoints does not works
28.When do we use breakpoints? 
answer: stop execution to verify values of variables.
29.Why do we require a database checkpoint in test? 
answer: To test database as the backend
30.Which query tool is used to create a query in Database Query Wizard? 
answer: MS query
31.What does the source property of a database test object specify? 
answer: Connection string; username; password;
32.Name the object repository type in which QuickTest pro saves the
information about objects during a record session, by default? 
answer: per action (local)
33.Where are shared objects stored in QuckTest Professional? 
answer: in .TSR files
34.Which object repository type can you create using Object Repository
Manager? 
answer: Global
35.When do we use a low level recording to record a test? 
answer: If QTP does not any objects at all
36.When do we use analog recording to record a test? 
answer: To record mouse movement for example online signature.
37.How does a bitmap checkpoint work?
38.What is a virtual object? 
answer: A generic object mapped to the standard object.
39.What are the components of a recovery scenario? 
answer: Trigger, Recovery, Post-recovery
40.When do you select the Object State trigger event type? 
answer: On the “Select Trigger Event” screen
41.Can you select multiple recovery operations for the trigger event? 
answer: Yes
42.When does an optional step execute in a test? 
answer: When this object exists. ( this is build for negative testing)
Advance questions that can be used for Mercury QTP certification
preparation 
For reference download free VBScript Tutorial and QTP code samples
as .zip file 

Download now

43.What are 3 categories of steps in Step Generator? 


answer: Function; Test object; Utility object
44.What is the function of the auto expend VBScript syntax feature in
Expert view? 
answer: to help with programming
45.What is the function of the VBScript With statement? 
answer: Edit -> advance -> Apply with
46.What is the function of breakpoints? 
answer: Allows debug the code.
47.What are the advantages of retrieving the values of the properties of an
object? 
answer: Create checkpoints; create your own logic; populate a
datasheet faster.
48.Which command will you use in QuickTest Pro to retrieve the value of
the enabled property of a button in an application? 
answer: RO property (runtime)
49.What is the difference between constants and variables? 
answer: constant can’t be changed and variable can be changed.
50.What are dynamic objects? 
answer: Dynamic objects are changed during time of test execution.
51.What is the function of a Description object? 
answer: To hold a property value.
52.What are the steps involved in building a programmatic description of
dynamic objects? 
answer: 1. Identify the object class. 2. Select object properties. 3. Create
a programmatic description.
53.What are the additional uses of programmatic descriptions? 
answer: bypass the object repository.
54.What is the function of the Is operator? 
answer: Compare two objects.
55.What is the function of the Set operator? 
answer: Set a variable to an object.
56.What does the split function do? 
answer: Returns a zero-based, one-dimensional array containing a
specified number of substrings.
57.What are the VBScript functions that invoke dialog boxes to interact
with users? 
answer: 1 . InputBox function: Displays a prompt in a dialog box, waits
for the user to input text or click a button, and returns the contents of
the text box. 2. MsgBox Function: Displays a message in a dialog box,
waits for the user to click a button, and returns a value indicating which
button the user clicked.
58.Which method do you use to retrieve data from the WebList object?
59.What is difference between the For..Next and While..Wend statements?
60.What is the function of GetSheet method in Data Table? 
answer: Only sets focus on the current sheet.
61.Which property do you use to retrieve or assign data into a cell in a
Data Table object?
62.Give a scenario in which you may require to access data from external
sources.
63.What are the methods used to import data from and export data into a
MS Excel worksheet? 
answer: import sheet and export sheet
64.What is the purpose of the Close method?
65.What are the methods of the TextStream object that are used for
reading from a text file?
66.What are the advantages of creating a procedure in a test? 
answer: to increase usability
67.What is the difference between a subroutine and function procedure? 
answer: Function is always return a value
68.What is the advantage of associating a procedure with a test object?
69.How do you create a library file?

Find more on Automated testing with Mercury's QuickTest Professional. 


Also you can find interview questions related to Quality Center Web-based
test management tool

On this page I put some Interview Questions for QA and testers. These quick
test professional Interview Questions are very simple and mainly were used
for interviewing software testers who is involved in any type of testing. The
interview questions found above are listed in order of complexity. However all
new QTP interview questions (regardless of there difficulty) will be added to
the bottom of the list. You can find more Quick Test Pro related Interview
Questions searching the WEB. 
END QuickTest Professional Interview Questions.
Software Testing Main Page 
© 2007 Alex Samurin http://www.geocities.com/xtremetesting/ 

Anda mungkin juga menyukai