- QTP Tutorial
- QTP - Home
- QTP - Introduction
- QTP - Test Automation
- QTP - Environment Setup
- QTP - Record and Play Back
- QTP - Object Repository
- QTP - Actions
- QTP - DataTables
- QTP - Checkpoints
- QTP - Synchronization
- QTP - Smart Identification
- QTP - Debugging
- QTP - Error Handling
- QTP - Recovery Scenarios
- QTP - Environment Variables
- QTP - Library Files
- QTP - Test Results
- QTP - GUI Objects
- QTP - Virtual Objects
- QTP - Accessing Databases
- QTP - Working with XML
- QTP - Descriptive Programming
- QTP - Automation Object Model
- QTP - Frameworks
- QTP - Designing a Framework
- QTP Useful Resources
- QTP - Questions and Answers
- QTP - Quick Guide
- QTP - Useful Resources
- QTP - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
QTP Mock Test
This section presents you various set of Mock Tests related to QTP Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
QTP Mock Test I
Q 1 - When you create a bitmap checkpoint, UFT captures only the visible part of the object as bitmap, it does not capture anything which is scrolled off the screen.
Answer : A
Explanation
QTP/UFT captures only the visible part of the object when using bitmap checkpoint
Q 2 - An action cannot be splitted when :
An external action is selected.
The first step of an action is selected
A reusable action is selected
Recording a test
Answer : C
Explanation
An action cannot be splitted when an external or reusable action is selected or in a record session.
Q 3 - How do you Interrupt/Pause a running session ?
Automation > Pause.
Run > Pause
Tools > Pause
Clicking on Pause button at toolbar
Pressing Pause Keyboard button
Answer : C
Explanation
A run session can be paused by pressing Pause keyboard button or Clicking the pause button or selecting Run > Pause menu option.
Q 4 - You can remove the call to an action from a test by selecting the action using
Resource pane
Test Flow pane
Keyword view
Expert view
Answer : C
Explanation
An action call can be removed from the test either from Keyword view or Resource or Test flow pane.
Q 5 - Which of the tool(s) is/are available along with the installation of UFT?
Silent Test Runner
Test Batch Runner
Script Batch Runner
Test Result Creation Tool
HP Video Player
Remote Agent
Answer : D
Explanation
The tools that are available along with the installation of UFT are Silent Test Runner, Test Batch Runner, Remote Agent, HP Micro Player, Test Result Deletion tool.
Q 6 - When you call a sub procedure, you can use the call statement as
call mySubProc(argument)
Also,you can omit the call statement and just use − mySubProc(argument)
Answer : B
Explanation
When you don't use call statement, parenthesis can not be used while calling a sub.
Q 7 - Can you enhance your test by parameterizing the values used. Which of the following are valid parameter type and can be used in your test?
Test/Action parameters
Data table parameters
Environment variable parameter
Recovery Parameters
Resources parameters
Answer : C
Explanation
There are four types of parameters in UFT – Test/Action parameter, Data table parameter, Environment variable parameter and Random number parameter.
Q 8 - How do you call a function created within your test?
Function Flight(x) .. ... ... End Function
Call Flight z
Call Flight(z)
n = Flight(z)
n = Flight z
Answer : B
Explanation
Parenthesis should be used while calling a function using a call statement or assigning to a variable.
Q 9 - What information is displayed at System Monitor Tab in test result ?
Application Name, Counter scale, Current Step
Application Name, Product Name, System Information
System Counter List, Maximum Counter Value
System Information, Application Name and System Counter List
Answer : A
Explanation
System Monitor tab displays information related to Application Name, Counter Scale, Current Step, System Counter List, Maximum Counter Value. It does not show information related to Product Name or System information.
Q 10 - While merging two object repositories using Merge Tool, if an object in the secondary repository has the same name, description properties and values as an object in the primary object repository which has some additional properties and values, how this conflict can be handled?
By keeping the object added from the primary object repository only.
By keeping the object added from secondary repository only.
By keeping the object added from both the repository.
by ignoring both repository and adding a fresh new object.
Answer : A
Explanation
You can handle this conflict by either adding objects from primary object repository only or only from secondary object repository or both..
Q 11 - How can you can hide Item column in keyword view?
Right click on column header and unselect item
Right click select 'view options' and remove item from visible column list
Select Item column at Tools > View Options
you cannot hide Item column in keyword view
Answer : A
Explanation
You can hide a column in keyword view by right clicking on column header and unselect the header name or select view Option and remove the header from visible column list.
Answer : B
Explanation
We cannot edit Analog recording steps
Q 13 - Mark all the ways that can be used to share values between actions.
using Global Data Table
using Environment Variables
using sendparameter command
using Dictionary Objects
Answer : B
Explanation
Global data table, environment variables and dictionary object can be used to share values among actions.
Q 14 - Which of these checkpoints does not require the test to be in recording mode?.
Standard checkpoint
Database checkpoint
XML checkpoint
Page checkpoint
Bitmap Checkpoint
Answer : C
Explanation
You can insert database and xml checkpoint without being in recording mode.
Q 15 - Which of the following statement can be used if you want a run session to wait until the a webedit field is enabled?.
Browser("Browser").Page("Page").WebEdit("Edit").WaitProperty("disabled",0)
Browser("Browser").Page("Page").WebEdit("Edit").WaitProperty("disabled",1)
Browser("Browser").Page("Page").WebEdit("Edit").WaitProperty("enabled",1)
Browser("Browser").Page("Page").WebEdit("Edit").Enabled = True
Browser("Browser").Page("Page").WebEdit("Edit").Enabled(5)
Browser("Browser").Page("Page").WebEdit("Edit").Enabled = True
Answer : A
Explanation
You can either use enabled or disabled property to check whether webEdit field is enabled. if enabled value will be 1 else 0.
Q 16 - How can you open a process that is available for currently open document?
File > Process Guidance Management
Automation > Process Guidance List
Process Guidance Pane
we cannot open a process.
Answer : C
Explanation
A Process can be viewed in Process Guidance Pane and also can be opened by selecting Automation > Process Guidance list.
Q 17 - There is no need to specify HP ALM / QC in the list of browser to ignore at Record and Run settings dialog box..
Answer : B
Explanation
By Default, UFT ignores all instances of HP ALM / Quality center.
Q 18 - What type of image format UFT supports for CaptureBitmap method?
bmp
jpg
png
gif
Answer : C
Explanation
UFT supports only bmp and png types only using captureBitmap Method.
Q 19 - You can modify the concurrent license server.
using License Wizard
by setting LSHOST user variable
by setting LSFORCEHOST user variable
at Help > About dialog box
Answer : C
Explanation
Concurrent license server details can be modified using License Wizard or by setting LSHOST or LSFORCEHOST user variable. It cannot be modified using Help > About Dialog box
Q 20 - UFT license type that is specific to a computer on which it is installed is known as ________
Concurrent license
Floating license
Seat License
Personal License
Answer : B
Explanation
Seat license is specific to a computer on which it is installed.
Q 21 - You can copy and paste OR drag-drop steps to move the steps to a different location in Keyword view.
Answer : A
Explanation
Copy paste and drag drop steps can be done to move steps to a different location in Keyword view.
Q 22 - Recovery Scenarios, Object Repository per Action and Shared Object Repository carry extensions
A - qrs, mtr and mtb respectively
B - qrs, mtr and tsr respectively
Answer : B
Explanation
File Extensions for a Recovery scenario file is ‘qrs’, for Per Action Object Repository – ‘mtr’,shared object repository -‘tsr’ Batch Test – ‘mtb’, Script file – ‘mts’ for action template – ‘mst’.
Q 23 - Which of the following statements is/are false ?
UFT is an object based testing tool.
UFT is a Protocol based testing tool.
UFT is a Functional and Regression testing tool.
UFT is an open source testing tool.
Answer : C
Explanation
UFT is neither a Protocol based testing tool nor a open source testing tool.
Q 24 - Using 'Save Test with resources', UFT saves a copy of any external action used.
Answer : B
Explanation
UFT always saves a copy of external action used when using 'Save Test with Resources'.
Q 25 - Which of the following could be possible objective(s) for test automation? Mark all that apply.
Increase speed of testing
Reduce manual effort
Ensure consistency
Eliminate manual testing.
Answer : A
Explanation
Automating a test, provides you an increased speed of your testing, it reduces manual effort and ensures consistency, It does not replace manual testing.
Q 26 - Which property/method can be used as custom checkpoints in UFT?
Wait
Exist
Sync
GetROProperty
Answer : D
Explanation
Exist and Sync can be used as custom checkpoints.
Q 27 - What can be used to capture timings in your test?
StartTransaction and EndTransaction
StartTime and EndTime
Timer
Sync
Answer : C
Explanation
StartTransaction and EndTransaction can be used to capture timings, instead of this you can also use Timer function.
Q 28 - Which of the following is a recovery operation available in UFT?
Click Button with label
Click Link with Text
Click Default Button/Press the Enter Key
Click Cancel Button/Press the Enter Key
Mouse Left/Right Click
Press Key or Key Combination
Answer : A
Explanation
The valid recovery operations are Click Default Button/Press the Enter Key, Click Cancel Button/Press the Escape Key, Click Button with Label and Press Key or Key Combination.
Q 29 - While creating a database checkpoint, you can define your database query ________
Using Connectionstring
Using Microsoft Query
Using Microsoft Debugger
By Manually defining a SQL Statement
Answer : A
Explanation
A database query can be defined by using Microsoft Query or by Manually defining a SQL statement.
Q 30 - 'Exit For' can be used as an alternate way to exit from the loop of _______________.
Do...While
For...Loop
For...Next
For Each...Next
Answer : D
Explanation
Exit For can be used to exit from a For..Next and For Each Next loop.
Q 31 - Why do you use Add-in Manager?
to open UFT.
to load objects and properties for testing your application
to load support for testing your application.
to create object repository for testing your application
Answer : B
Explanation
You use the Add-in Manager to load support for testing your applications.
Q 32 - Which function can be used to convert data from one subtype to another?
Date
Format
CInt
CStr
Answer : D
Explanation
CInt converts to Integer and CStr converts to string.
Q 33 - You can use a checkpoint as in the statement below
Browser("Browser").Page("Page").check CheckPoint("text:=sometext")
Answer : B
Explanation
Descriptive programming can not be used with checkpoints.
Q 34 - The changes made in Call to Action, will be reflected in the original action (from where the script is called) where as in Copy Action , the changes made in the script ,will not effect the original script(Action)
Answer : A
Explanation
Seat license is specific to a computer on which it is installed.
Q 35 - How can you remove a stored movie from the test result?
Selecting File > Remove Movie from Results.
Selecting Tools > Remove Movie from Results.
Delete physical movie file from the result location.
once recorded you can not remove the movie from test result.
Answer : C
Explanation
To remove recorded movie from the test result, you can either select ‘Remove Movie from Results’ in File menu or you can delete the physical movie file at result location.
Q 36 - Which QuickTest operation can not be performed on a virtual object?
cannot be used in expert view
cannot insert a standard checkpoint
cannot insert a image checkpoint
cannot use object spy
Answer : D
Explanation
You cannot insert any type of checkpoint on a virtual object, or use the Object Spy to view its properties.
Q 37 - How can you create a .zip file of your test?
File > Export Test to zip file
File > Save as zip file
File > Save Test with sources and select Archive test and resource files in a zip file check box
CTRL+ALT+S
you can not create a .zip file of the test.
Answer : A
Explanation
UFT has a feature to export youur test to a zip file. you can do this by selecting ‘File >> Export Test to zip file’ (CTRL+ALT+S) menu options, or while saving the test with resources(File>Save Test with Resources) and select Archive test and resource files in a zip file check box.
Q 38 - Which of these Add-ins QTP currently supports to work with Extensibility?
.Net
Visual Basic
Delphi
Web
Answer : D
Explanation
Currently UFT supports Web, .Net, Java and Delphi Add-ins for Extensibility.
Q 39 - When you split an action in your test that uses a local repository, Quick Test makes a copy of the local object repository and if you add objects to one of the split actions, the new object are added only to the corresponding repository.
Answer : A
Explanation
Yes, When you split an action in your test that uses a local repository, Quick Test makes a copy of the local object repository and if you add objects to one of the split actions, the new object are added only to the corresponding repository.
Q 40 - Which is the best match for the regular expression for deer|dees
deer
deedess
deerees
dees
Answer : C
Explanation
'|' instructs UFT to match one of a choice of expressions.
Q 41 - When you use 'Object' Property of an object. What does it imply?
you get a reference to the DOM object
you can access the internal methods and properties of the object
you can use an object that is not in Object Repository
you can access the test object properties of an object from object repository
Answer : A
Explanation
Object property accesses the internal methods and properties also references to the DOM object.
Q 42 - We can use regular expression for urls in the list of Browsers under Tools > Options > Web to ignore them during record and replay time.
Answer : A
Explanation
We can use regular expression for urls in the list of browsers to ignore.
Q 43 - What type of environment variables can be added from Environment view under Test Settings?
Answer : A
Explanation
There are two types of environment variable – built-in and User-defined.
Q 44 - Instead of using File > Open Test to open an existing test, what other possible way(s) you can use to open an existing test?
Select Test from the recent file list in the File menu
Select Test from the recent file list in the start page
dragging a test from windows explorer
Selecting Right click in test editor and select Open Test
Answer : D
Explanation
ou can open a test by dragging it from windows explorer , also for a recent file used you can select the test from Recent file list.
Q 45 - If you drag-drop a function into your test, UFT removes that function from Available Keywords pane and inserts a call to the function in the test.
Answer : B
Explanation
UFT does not remove the function from Available keywords pane if you drag-drop any function to the test.
Q 46 - How do you synchronize your scripts in QTP ?
Sync
Exist
WaitProperty
Visible
Answer : A
Explanation
You can synchronize script using Sync, Exist or using WaitProperty.
Q 47 - A comment in Expert view can begin with ... so that it can be seen at comments tab in To Do pane.
'To Do
'to-do
'todo
only a single quote ( ' )
Answer : C
Explanation
You can view a comment in comments tab by adding To Do, todo or to-do after single quote.
Answer : B
Explanation
You can insert conditional statements in keyword as well as expert view.
Answer : B
Explanation
Input or output action parameter names are case sensitive.
Q 50 - Which is the best match for the regular expression for dee(r|d)ees
deer
deedees
deerees
dees
Answer : B
Explanation
‘|’ instructs QTP to match one of a choice of expression, ‘(‘ groups the expression.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | A |
2 | C |
3 | C |
4 | C |
5 | D |
6 | B |
7 | C |
8 | B |
9 | A |
10 | A |
11 | A |
12 | B |
13 | B |
14 | C |
15 | A |
16 | C |
17 | B |
18 | C |
19 | C |
20 | B |
21 | A |
22 | B |
23 | C |
24 | B |
25 | A |
26 | D |
27 | C |
28 | A |
29 | A |
30 | D |
31 | B |
32 | D |
33 | B |
34 | A |
35 | C |
36 | D |
37 | A |
38 | D |
39 | A |
40 | C |
41 | A |
42 | A |
43 | A |
44 | D |
45 | B |
46 | A |
47 | C |
48 | B |
49 | B |
50 | B |