Tuesday, May 24, 2011

How QTP recognizes the objects stored in object repository

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

How QTP recognizes the objects stored in object repository
1. QTP uses the Object Repository to identify objects in the AUT. How will it identify objects stored in the OR? Well, the same way we identify each other because we have their "description" stored in our brain. Even though this is a bad example, but for the sake of explanation, let's say OR is the brain of QTP.

When QTP encounters an objects, it searches for that object in its brain and if it has encountered that object before, it performs the necessary action. If it does not, it fails the test; the same way, if you haven’t seen a person ever before and they ask for you to lend them $100, you would go like “Do I know you?” and walk away.

The OR should contain all the objects that you need for your tests to run successfully. If you want to write a keyword-driven script in QTP to login a user in www.gmail.com, you will have to access the Browser, the respective page, the username field, the password field and the SignIn button. All these objects will be then stored in QTP’s OR. So after you are done recording, you will playback the script and have the user login. This is done because QTP has already stored object definitions for all the objects it has to interact with in its OR.

There are ways to bypass this, by using Descriptive Programming and not making use of QTP’s OR. So, it entirely depends on what you want to use and what you are the most comfortable with.

What is test object?

What is test object?
Test Object is used by QTP to identify an object in the AUT during playback. While Run Time object that actually exists in the application

What is InStr Function?

InStr Function
Returns the position of the first occurrence of one string within another.
InStr([start, ]string1, string2[, compare])
start
Optional. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. If start contains Null, an error occurs. The start argument is required if compare is specified.
string1
Required. String expression being searched.
string2
Required. String expression searched for.
compare
Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings section for values. If omitted, a binary comparison is performed.
Dim SearchString, SearchChar, MyPos
SearchString ="XXpXXpXXPXXP" ' String to search in.
SearchChar = "P" ' Search for "P".
MyPos = Instr(4, SearchString, SearchChar, 1) ' A textual comparison starting at position 4. Returns 6.
MyPos = Instr(1, SearchString, SearchChar, 0) ' A binary comparison starting at position 1. Returns 9.
MyPos = Instr(SearchString, SearchChar) ' Comparison is binary by default (last argument is omitted). Returns 9.
MyPos = Instr(1, SearchString, "W") ' A binary comparison starting at position 1. Returns 0 ("W" is not found).

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

How will you load the object during run time?

How will you load the object during run time?
1. Well, we won’t load objects during runtime, we only instruct QTP to interact with an object so it identifies it during runtime. QTP stores object definitions, or Test Object properties and along with those, it also stores Runtime object properties in its Object Repository. When the test runs, QTP maps these test object properties with the object’s runtime properties. If it successfully maps the runtime properties, test passes. If not, test fails.

If you were asking about creating an instance of a particular application (or process) via QTP, then yes, it can be done using the “CreateObject” function. CreateObject basically creates an instances of an OLE Automation.

For example, I want QTP to initiate an instance of Microsoft Excel, you would do it something like this:

Dim oExcel
Set oExcel=CreateObject(Excel.Application)
oExcel.Launch ‘(Just for reference) Start Excel
oExcel.visible=True ‘(Just for reference) Make Excel Application visible

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

How do you close the Task Manager through QTP?

How do you close the Task Manager through QTP?

First you should add the Task Manager dialog box in the object repository.
This is not a modal dialog box so you can add it to repository easily.
Then use following simple code.

If Dialog("Windows Task Manager").Exist Then
Dialog("Windows Task Manager").Close
Reporter.ReportEvent micPass "Task Manager" "Successfully closed task
manager"
Else
Reporter.ReportEvent micFail "Task Manager" "Task Manager is not open"
End If

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

What is the difference between Normal mode and Fast mode?

What is the difference between Normal mode and Fast mode?
normal mode: runs your test or component with the execution arrow to the left of the keyword view or expert view, marking each step or statement as it is performed. If the test contains multiple actions, the tree in the keyword view item column expands to display the steps, and the expert view displays the script, of the currently running action. You must have microsoft script debugger installed to enable this mode. fast mode. Runs your test or component without the execution arrow to the left of the keyword view or expert view (for tests) and does not expand the item tree or display the script of each action as it runs. This option requires fewer system resources
What is the Obect Repository type
Object Repository: 2 types ( Per-action, Shared)
Per-Action: Default , but it is not reusable , used to that
current test only, Extension :- Mtr
Shared:its a reusable repository, we can use in multiple
scripts ,extension :- tsr
using this syntax : repositoriescollection.add("Path") we
can use int script itself

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

What is Description Object?

What is Description Object?
The description object enables descriptive programming which is basically accessing GUI objects without actually recording / storing them in an Object Repository. The description object will store a set of "properties" typically a "name and value pair" for a particular "class" which then can be accessed with the help of the description object.
e.g:
Set obj_desc = Description.Create
obj_desc("html_tag").value = "Password"
obj_desc("name").value = "txtUserPassword"
The name/value pair in this case is "html_tag" and "Password".It implies that the gui object will be an html tag with the tag name as Password.
Hence in the above case we manage to identify the gui object without actually referring to the object repository and then can use it inside the code to manipulate / perfrom operations on that object.

What is Test Frame Work?

What is Test Frame Work?
Automation framework is one....it is a test plan for
automation testing which drives entire automation testing
in a sytemamatic and scientific manner to execute the test
script like Main Script--->DriverScripts--->Environment
variables, Library files, Functions, Test Data(data table -
Parameterization.

Here MainTest Script will call the DriverScripts
DriverScripts will call the required Env, Lib files,
Func.....etc.

So the entire test will be executed/carried out in a flow
like explained above.(This comes under Keyword Driven
Framework).

QTP Certification Dump

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/
Question: 1
Where do you go to modify a shared object repository?
A. Resources > Object Repository Manager
B. Resources > Object Repository
C. Tools > Object Repository Manager
D. Tools > Resources Manager > Object Repository
Answer: A
Question: 2
What is a QuickTest Professional test comprised of?
A. calls to actions
B. calls to actions (reusable only)
C. calls to QuickTest Professional tests
D. calls and copies of actions
Answer: A
Question: 3
Where is the System Monitor tab located?
A. in the right pane of the Test Results window
B. in the Information pane
C. in the Resources pane
D. in the right pane of the System window
Answer: A
Question: 4
Which checkpoint type should you use to validate the enabled state of a button?
A. text
B. standard
C. bitmap
D. XML
Answer: B
Question: 5
Which language is used for Expert View?
A. TSL
91) An ........ assigns a numerical value to a test object that indicates its order or location relative to other objects with an otherwise identical description (objects that have the same values for all properties)
A) Index identifier.
B) ordinal identifier.
C) SMART ID identifier.
D) original identifier.
92) You can add an object to the local object repository only if that object does not already exist in a shared object repository that is associated with the action. If an object already exists in an associated shared object repository, you can add it to the local object repository using the ........ option.
A) Copy from Shared Repository
B) Copy from Shared Object Repository
C) Copy to Local
D) Copy to Local repository
93) You can copy, paste, and move objects in the local object repository using the Object Repository window, and copy, paste, and move objects both within a shared object repository and between shared object repositories using the Object Repository Manager. But you cannot copy objects from a shared object repository to the local object repository to modify them locally
A) True
B) False
94) At the time of copying, pasting and moving objects, you cannot move an object to any of its descendants.
A) True
B) False
95) When you remove a step from your test, its corresponding object is also removed from the object repository
A) True
B) False
96) You can use the Find and Replace dialog box to replace property or object names.

A) True
B) False
97) The Object Repository window is ...... during record and run sessions
A) read-only
B) read-write only
C) read-write and enable
D) None of above
98) In the Associated Repositories tab of the Action Properties dialog box, the ......object repository is always listed first and cannot be moved down the priority list or deleted.
A) local
B) shared
C) Both
D) None
99) In the Associated Repositories tab of the Action Properties dialog box, although we can order the object repositories according to our choice except the fact that Shared Repository remains the first one and cannot be removed.
A) True
B) False
100) If your object repositories are stored in the file system and you want other users or Mercury products to be able to run this action on other computers, you should set the file path as a
A) Absolute path
B) relative path
C) both
D) None of above

Answers

91) B, 92) C, 93) B, 94) A, 95) B, 96) B, 97) A, 98) A, 99) B, 100) B
71) QuickTest processes a comments when it runs a test.

A) True
B) False

72) Press ..... to add a new step below the currently selected step.

A) F8
B) Shift + A
C) F0
D) Shift + A + Q

73) While working with the Keyword View, you can ...... steps to move
them to a different location in a test or in an action

A) Copy and Paste
B) Cut and Paste
C) Drag and drop
D) Both A) and C)

74) You can specify the order in which the columns are displayed in the
Keyword view.

A) True
B) False

75) You can view ....... while working with keyword view.

A) object properties
B) action properties
C) action call properties
D) checkpoint properties
E) Output value properties
F) None of the above
G) All of above


76) You cannot manage some aspects of a local object repository using
the QuickTest Object Repository automation object model..

A) True
B) False

77) For each action, you can use a combination of objects from your
local and shared object repositories.

A) True
B) False

78) QuickTest adds all new objects to the local object repository even
if one or more shared object repositories are already associated with
the action assuming that an object with the same description does not
already exist in one of the associated shared object repositories..

A) True
B) False

79) If a child object is added to a local object repository, and its
parents are in a shared object repository, then you have to manually
drag and drop its parent objects from shared object repository to local
object repository.

A) True
B) False

80) The ....... is not accessible as a separate file

A) local object repository
B) shared object repository
C) Both
D) None

Answers

71) B, 72) A, 73) D, 74) A, 75) G, 76) B, 77) A, 78) A, 79) B, 80) A
81) In the Object Repository window:.
A) Local objects are editable (black)
B) Shared objects are in read-only format (gray)
C) Local objects are in read-only format (gray)
D) Shared objects are editable (black)
82) Mark true statement(s):.
A) You can delete objects from a shared object repository using the Object Repository window.
B) You can delete objects from the local object repository using the Object Repository Manager
C) You can delete objects from the local object repository using the Object Repository window
D) You can delete objects from a shared object repository using the Object Repository Manager
83) You can modify an object stored in a shared object repository.
A) using the Object Repository Manager
B) using the Object Repository window
C) you can copy it to the local object repository and then modify its properties
D) you cannot modify properties of objects stored in Shared object repository
84) If an object is contained in both local and shared repositories then, during a run session.
A) QuickTest will use the object in the local object repository
B) QuickTest will use the object in the Shared object repository
C) There will be a conflict
D) QuickTest will use Descriptive Programming
85) When you copy an object to the local object repository
A) its parent objects are also copied to the local object repository
B) its parent objects are not copied to the local object repository
C) You have to manually copy its parent objects are also copied to the local object repository
D) You have to manually drag and drop its parent objects
86) For tests, you can also view test object properties and property values for objects in the Active Screen, regardless of whether the objects are
stored in the object repository.
A) True
B) False
87) Object Properties window differs for objects stored in Shared and Local object repository.
A) True
B) False
88) You can rename objects in the shared object repository using the Object Repository Manager
A) True
B) False, you cannot rename objects in shared object repository
89) When you modify the name of an object in the local object repository, the name is automatically updated in ....... for all occurrences of the object..
A) in the Keyword View
B) in the Expert View
C) Both Keyword and Expert View
D) Changing name of an object doest not effect keyword or expert view
90) When you modify the name of an object in a shared repository, the name is automatically updated in all tests open on the same computer that use the object repository as soon as you make the change, even if you have not yet saved the object repository with your changes.
A) True
B) False

Answers

81) A,B, 82) C,D, 83) A,C, 84) A, 85) A, 86) A, 87) A, 88) A, 89) C, 90) A


61) You can use the Keyword View to add a step ..........in your test.

A) at the end
B) below the currently selected step
C) at the beginning
D) at anypoint

62) The Documentation cell is .............

A) Read-only
B) Write-only
C) Read and Write
D) Read, write & execute

63) An Item column can be any of the following:

A) A test object
B) A statement like Dim
C) A step generated by step generator
D) All of above

64) The Operation cell in the keyword view specifies the operation to be
performed on the item listed in the ........... column.

A) Operation
B) Documentation
C) Item
D) Value

65) Even if the Item column in the Keyword View is displayed to the
right of the Operation column, you must still first select an item to
view the list of available operations in the Operation column.

A) True
B) False

66) The Value cell in the keyword view can contain........ value

A) Constant
B) Parameter
C) Both A) & B)
D) None of these

67)The ............... enables you to encode your passwords and place
secure values into the Data Table.

A) Password Encoder
B) Password Decoder
C) Password Encode
D) Password Decode

68) You can also encrypt strings in Data Table cells using the .........
option in the Data Table menu.

A) Decrypt
B) Encrypt
C) Encrypt Code
D) Decrypt Code

69) In addition to adding standard statement steps to your test using
the Keyword View, you can also insert

A) Checkpoint step
B) Output value step
C) Comment step
D) All of above

70) The correct syntax of the conditiona statement starting with Do is.....

A) Do...While
B) Do...Until
C) Do...Next
D) Both A) and B)


Answers

61) D, 62) A, 63) D, 64) C, 65) A, 66) C, 67) A, 68) B, 69) D, 70) D
41) Object Spy can be found in ........menu.

A) Tool
B) Tools
C) Task
D) Tasks

42) ............ displays the open documents side-by-side.

A) Tile Vertically
B) Tile Horizontally
C) Cascade
D) Tile Cascade

43) For opening the QuickTest Professional Help we can use.......

A) F3
B) F5
C) F1
D) F2

44) If QTP cannot find any object that matches the description, or if it
finds more than one object that matches, QuickTest may use
the............mechanism to identify the object.

A) Ordinal Identifier
B) Index Identifier
C) Smart Identification
D) Assistive Identification

45) You can configure the ........, ............ and ............
properties that QuickTest uses to record descriptions of the objects in
your application

A) mandatory, assistive, and ordinal identifier
B) mandatory, required, and ordinal identifier
C) smart, assistive, and ordinal identifier
D) Index, assistive, and ordinal identifier

46) The .......... property set for each test object is created and
maintained by QuickTest.

A) Run-Time Object
B) Test Object
C) Smart Identification Object
D) Assistive Object

47)You can access and perform ......... methods using the Object property.

A) Run-Time Object
B) Test Object
C) Smart Identification Object
D) Assistive Object

48) You can view or modify the test object property values that are
stored with your test in the .........

A) Information Pane
B) Data Table
C) Information Pane & Data Table Both
D) Object Properties & Object Repository dialog box.

49) You can retrieve or modify property values of the test object during
the run session by adding ..........statements in the Keyword View or
Expert View.

A) GetROProperty & SetROProperty
B) GetTOProperty & SetTOProperty
C) GetTOProperty & SetROProperty
D) GetROProperty & SetTOProperty

50) If the available test object methods or properties for an object do
not provide the functionality you need, you can access ..............of
any run-time object using the Object property.

A) The internal methods and properties
B) The mandatory methods and properties
C) The selective methods and properties
D) The assistive methods and properties


Answers

41) B, 42) A, 43) C, 44) C, 45) A, 46) B, 47) A, 48) D, 49) B, 50) A
51) Using the Object Spy, you can view

A) the run-time or test object properties and methods of any object in
an open application.
B) the run-time or test object properties of any object in an open
application.
C) the test object properties and methods of any object in an open
application.
D) the run-time object properties and methods of any object in an open
application.

52) There are .........object type filters in Object spy dialog box.

A) Two
B)Three
C) Four
D) Five

53) In the Object Spy window, in the Properties Tab

A) Copying of Properties and its values is possible with CTRL+C
B) Copying of Properties and its values is possible by right clicking on
it and choosing copy.
C) Copying of Properties and its values is possible with both A) and B)
methods
D) Copying of Properties and its values is possible is not possible

54) In the Object Spy window, in the methods Tab

A) Copying of Methods is possible with CTRL+C
B) Copying of Methods is possible by right clicking on it and choosing copy.
C) Copying of Methods is possible with both A) and B) methods
D) Copying of Methods is possible is not possible

55) Object Spy dialog box

A) Can be resized
B) Cannot be resized

56) .............. are the highest level of the test hierarchy in the
Keyword view.

A) Tests
B) Steps
C) Call to Actions
D) Actions

57) You can copy and paste or drag and drop actions to move them to a
different location within a test

A) True
B) False

58) You can print the contents of the Keyword View to your Windows
default printer (and even preview the contents prior to printing).

A) True
B) False

59) In the Keyword View, you can also view properties for items such as
checkpoints.

A) True
B) False

60) In the step Browser > Page > Edit > Set "Sachin", identify container
object(s)

A) Browser
B) Edit
C) Page
D) Both Browser & Page

Answers

51) A, 52) A, 53) A, 54) A, 55) A, 56) D, 57) A, 58) A, 59) A, 60) D
31) You can manage the test actions and the test or function library
steps using the ... menu commands

A) File
B) Edit
C) Automation
D) Tools

32) To expand all the steps in the keyword view which option you would
use from the View menu.

A) Expand
B) Expand All
C) Expand Items
D) Expand Rows

33) What is the shortcut key to open a Step Generator.

A) F2
B) F5
C) F6
D) F7

34) Function Definition Generator in found in which menu option.

A) File
B) Tools
C) Insert
D) View

35) The shortcut keys for Record, Stop and Run respectively are

A) F3, F4, F5
B) F4, F3, F5
C) F4, F5, F3
D) F3, F5, F4

36) What is the shortcut key for opening an Object Repository.

A) Alt+R
B) Shift+R
C) Ctrl+R
D) Shift+O+R

37) Shortcut key to Insert/Remove a breakpoint is

A) F9
B) F8
C) Ctrl+b
D) Shift+b

38) .........runs only the current line of the script. If the current
line calls a method, the method is displayed in the view but is not
performed.

A) Step Over
B) Step Out
C) Step Into
D) Step Till

39) .........runs only the current line of the script. When the current
line calls a method, the method is performed in its entirety, but is not
displayed in the view.

A) Step Over
B) Step Out
C) Step Into
D) Step Till

40) What is the shortcut key to Clear all Breakpoints

A) Ctrl+Shift+F9
B) Shift+Ctrl+F9
C) Alt+Shift+F9
D) Alt+Ctrl+F9


Answers

31) B, 32) B, 33) D, 34) C, 35) A, 36) C, 37) A, 38) C, 39) A, 40) A
21) Panes in QTP can have one of the following states—docked or floating.

A) True
B) False

22) Which of the following statement is True:

A) QuickTest enables you to open and work on one test at a time
B) QuickTest enables you to open and work on two tests at a time
C) QuickTest enables you to open and work on predefined number of tests
at a time
D) QuickTest enables you to open and work on nine test at a time

23) Which of the following statement is True:

A) You can open and work on two function libraries simultaneously
B) You can open and work on multiple function libraries simultaneously
C) You can open and work on nine function libraries simultaneously
D) You can open and work on one function library at a time

24) You can open any function library, regardless of whether it is
associated with the currently open test.

A) True
B) False

25) You can work with multiple documents (test, component, or
application area, function libraries) using the...... dialog box

A) Panes
B) Display
C) Show
D) Windows

26) QuickTest has ..... built-in toolbars.

A) 5
B) 6
C) 7
D) 8

27) The ......... toolbar contains buttons for recording and running
your test.

A) Standard
B) Tools
C) Automation
D) Edit

28) Shortcut Key for opening a new Function Library is:

A) Shift+Alt+N
B) Ctrl+Alt+N
C) Shift+N
D) CRTL+N

29) Shortcut Key for Closing all open Function Libraries in one go.

A) Ctrl+Alt+C
B) Shift+A+C
B)Shift+N
D) None of these

30) shortcut Key for Commenting out the current row, or selected rows

A) Shift+M
B) Ctrl+C
C) Ctrl+M
D) Shift+C


Answers

21) A, 22) A, 23) B, 24) A, 25) D, 26) D, 27) C, 28) A, 29) D, 30) C
11) The Information pane provides a list of............. in the test:

A) Semantic errors
B) Syntax errors
C) Common errors
D) Logic errors

12) When we switch from Expert view to the Keyword view, QTP
automatically checks for syntax errors in the test and shows them in the
information pane.

A) True
B) False

13) If the information pane is not open, QTP automatically opens it in
case a syntax error is detected.

A) True
B) False

14) ..................... provides a list of the resources that are
specified in your test but cannot be found.

A) Missing pane
B) Missing Resources pane
C) Resources pane
D) Missing Items pane

15) Whenever you open a test or a function library, QTP automatically
checks for the availability of specified resources.

A) True
B) False

16) The Data Table does not assists you in parameterizing your test.

A) True
B) False

17) Tabs in the Debug Viewer pane are:

A) Watch, Variables, Debug
B) Watch, Data, Command
C) Watch, Variables, Command
D) View, Variables, Command

18) ............... tab enables you to view the current value of any
variable or VBScript expression.

A) Watch
B) VIew
C) Locate
D) Current

19) The .... tab displays the current value of all variables that have
been recognized up to the last step performed in the run session.

A) View
B)Variables
C) Locate
D) Current

20) The .........tab enables you to run a line of script to set or
modify the current value of a variable or VBScript object in your test
or function library.

A) View
B) Variables
C) Command
D) Current

Answers

11) B, 12) A, 13) A, 14) B, 15) A, 16) B, 17) C, 18) A, 19) B, 20) C
1) 'Browser navigation timeout' is in which tab of Test Settings
(File->Settings) window.

A) Properties
B) Resources
C) Web
D) Web Settings

2) How many tabs are there in Test Settings (File->Settings) window

A) 7
B) 6
C) 5
D) 8

3) Identify the tabs in the Test Settings (File->Settings) window

A) Properties, Run, Resources, Parameters, Environment, Web, Recovery
B) Properties, Run, Resources, Parameters, Environment, Web
Settings,Recovery
C) Properties, Run Options, Resources, Parameters, Environment, Web,
Recovery
D) Properties, Run, Resources, Input Parameters, Environment, Web, Recovery

4) 'Generate Script' is in which tab of Test Settings (File->Settings)
window

A) Properties
B) Web
C) Resources
D) Recovery

5) The following are the four main columns in the Keyword view

A) Item, Operation, Value, Comments
B) Item, Operation, Value, Documentation
C) Item, Operation, Property, Documentation
D) Number, Operation, Value, Documentation

6) For each object and method in an Expert View statement, a
corresponding row exists in the Keyword View.

A) True
B) False
C) There is a problem with the statement.
D) None of above

7) You can work on one or several function libraries at the same time.

A) True
B) False

8) You can insert additional steps on the test objects captured in the
Active screen after the recording session.

A) True
B) False

9) The Active Screen enables you to parameterize object values and
insert checkpoints

A) True
B) False

10) A QTP user can increase or decrease the active screen information
saved with the test.

A) True
B) False

Answers

1) C, 2) A, 3) A, 4) A, 5) b, 6) A, 7) A, 8) A, 9) A, 10) A
1) The new Object Repository Comparison Tool is
accessible from the Object Repository Manager. You can
use this tool to identify the differences between
objects in ........
A) two specified shared object repository files.
B) a Shared and a Local object repository files.
C) either Shared or Local object repository files.
D) two specified Local object repository files.

2) You can use the objects and methods of the
QuickTest .................... to write scripts that
automatically manipulate object repositories, instead of
performing these operations manually using the Object
Repository Manager.
A) Automation object model
B) Object Repository automation object model
C) Object Repository model
D) Object Repository Script Object model

3) You must convert object repository files from
QuickTest Professional 8.2.1 or earlier to the current
format before you can use them in QuickTest Professional
9.0 or later. Which method lets you do so.
A) Conversion method
B) Converge method
C) Convert method
D) None

4) You open the Object Repository window for a
specific component by choosing ..........
A) Resources > Object Repository
B) Tools > Object Repository
C) File > Object Repository
D) Help > Object Repository

5) In QTP 9 or above, Test objects can be stored in
two types of object repositories—........
A) a shared object repository and a Per-Action object
repository.
B) a shared object repository and a local object
repository.
C) a shared object repository and a Action object
repository.
D) Both A & C

6) The Object Repository Manager enables you to open
...... shared object repositories and modify them as
needed
A) multiple
B) three
C) two
D) Seven

7) ........ Method Loads the specified object
repository.
A) Overload
B) Load
C) Both A & B
D) None

8) An object repository that is currently open by
another user is locked, is it possible to merge a locked
object repository.
A) Yes
B) No

9) You can manage the shared object repository
associations of a selected test using the ............
A) Associate Repositories dialog box
B) Object Repositories dialog box
C) Associate Repositories Manager dialog box
D) Object Repositories Manager dialog box

10) All changes you make to an object repository are
automatically updated in all components open on the same
computer that use the object repository as soon as you
make the change—even if you have not yet saved the
object repository with your changes.
A) True
B) False

11) If you want to modify an object stored in a shared
object repository, you can modify it.......
A) using the Object Repository Manager
B) you can modify it locally using the Object Repository
window.
C) Both A & B
D) None of above

12) ................ Returns an ObjectRepositories
collection representing all object repository files
associated with the action.
A) Object Property
B) Automation Object Model
C) ObjectRepositories Property
D) OR PropertyAnswers

Answers:

1) a 2) b 3) c 4) a 5) b 6) a 7) b 8) a 9) a 10) a 11) c 12)c
1) You can import and export object repositories from
and to .... files.
A) XML
B) MTS
C) TSR
D) XLS

2) In general, the ....... object repository is
easiest to use when you are creating simple record and
run tests.
A) Shared
B) Local
C) Both
D) None

3) The Object Repository automation object model
enables you to manipulate QuickTest ....... object
repositories and their contents from outside of
QuickTest.
A) Shared
B) Local
C) Both
D) None

4) Before using the Object Repository automation
object model to manipulate shared object repository
stored in Quality Center, you must download the shared
object repository and save it to the file system.
A) True
B) False

5) SetTOProperty changes the property values used to
identify an object during the test run. It also effects
the values saved in the Object Repository for the
object.
A) True
B) False

6) After creating or editing an object repository XML
file, it is recommended to use the QuickTest
..........functionality to verify that your file
conforms to the QuickTest object repository schema.
A) Schema Verification
B) Schema Validation
C) XML Validation
D) XML Verification

7) To display the Comment in the Object Repository
dialog box, you must use the attribute name .........
A) miccommentproperty
B) commentproperty
C) mic_comment_property
D) None of above

8) ObjectRepositoryUtil Object Enables you to
manipulate .....object repository files from outside of
QuickTest Professional.
A) Shared
B) Local
C) Both
D) None

9) You can use the Object Repository Merge Tool to
merge objects from ......
A) two shared object repositories into a single shared
object repository.
B) the local object repository of one or more actions or
components into a shared object repository.
C) Both A & B
D) None

10) GetTOProperty method returns the value of a
specified property for a test object from the Object
Repository.
A) True
B) False

Answers:

1)a 2)b 3)a 4)a 5)b 6)b 7)a 8)c 9)c 10)a
1. When a procedure is created in the Function Library editor, what is the extension on the file?

A. .INI
B. .TXT
C. .QFL
D. .VBS

2. What are the categories in the Step Generator?

A. Object, Operation, Value
B. Library, Built-in, Local Script
C. Operation, Arguments, Return Value
D. Test Objects, Utility Objects, Functions

3. In Test Settings ->Run the Data Table iteration options are for which data sheet?

A. Local
B. Global
C. Run-time Data Table
D. Design-time Data Table

4. What can you use to handle unpredictable testing exceptions?

A. A Do Loop
B. Recovery Scenario
C. IFHEN statement
D. Selectase statement

5. In which command can you associate a function library to a test?

A. Run Options
B. Test Settings
C. View Options
D. Function Definition Generator

6. Where do you set the action iterations for a specified action?

A. Action Settings
B. Action Properties
C. Action Run Settings
D. Action Call Properties

7. Where do you mark an action as reusable?

A. Action Settings
B. Action Properties
C. Action Run Settings
D. Action Call Properties

8. After running a test that contains both input and output parameters, where can the results of an
output parameter be found?

A. Local DataSheet
B. Global DataSheet
C. Run-time Data Table
D. Design-time Data Table


9. If you have a Virtual Object Collection stored on your machine, and you don't want to use it, what
must you do?

A. Disable Virtual Objects in Test Settings
B. Remove the Collection from your machine
C. Disable Virtual Objects in General Options
D. Remove the Collections from the Resources list

10. Which method for the DataTable utility object will allow you to retrieve information from the Data
Table during a test run?

A. Value
B. Import
C. GetCell
D. GetValue

Answers:

1 2 3 4 5 6 7 8 9 10
C D B B B D B C C A
1) You cannot expand ...... actions from the test flow
view.
A) reusable
B) non-reusable
C) both A & B
D) None

2) You can associate shared object repositories with
...... actions simultaneously, using the Associate
Repositories dialog box
A) seven
B) Two
C) Three
D) Multiple

3) You can associate ....... object repositories with
an action, and the same object repository can be
associated with different actions as needed
A) Nine
B) Twenty one
C) as many as you need
D) Twelve

4) Sometimes you may want to call an action from
within an action. This is called .......
A) Reusability
B) Nesting
C) Sharing
D) None

5) If a reusable action is called more than once in a
test and you split the action into two independent
actions, each call to the action within the test will be
followed by a call to the new (reusable) action. If a
reusable action is called from another test, however,
...... it may cause the calling test to fail.
A) Nesting
B) Splitting
C) Reusing
D) Both A & C

6) You must use the ...... Action option in QuickTest
if you want to save an action under another name.
A) Resave
B) Rename
C) Reuse
D) Split

7) When you remove an external action, you remove all
calls and the action from the action list. The original
action is also affected.
A) True
B) False

8) You can also press ...... to open the Rename Action
dialog box
A) Shift + F2
B) Shift + F3
C) Shift + F4
D) Shift + F5

9) If you want to include one or more statements in
every new action in your test, you can create an ....
A) reusable action
B) split action
C) Function
D) action template

11) Only the file name ...... is recognized as an
action template
A) ActionTemplate.mst
B) Action_Template.mst
C) Action-Template.mst
D) ActionTemplates.mst

Answers:

1) a 2) d 3) c 4) b 5) b 6) b 7) b 8) a 9) d 11) a

Compare 2 Excel sheets cell by cell

This code will open two excel sheet and compare each sheet cell by cell, if any changes there in cells , it will highlight the cells in red color in the first sheet.
Set objExcel = CreateObject(“Excel.Application”)
objExcel.Visible = True
Set objWorkbook1= objExcel.Workbooks.Open(“C:Documents andSettingsmohan.kakarlaDesktopDocs1.xls”)
Set objWorkbook2= objExcel.Workbooks.Open(“C:Documents and
Settingsmohan.kakarlaDesktopDocs2.xls”)
Set objWorksheet1= objWorkbook1.Worksheets(1)
Set objWorksheet2= objWorkbook2.Worksheets(1)
For Each cell In objWorksheet1.UsedRange
If cell.Value <> objWorksheet2.Range(cell.Address).Value Then
cell.Interior.ColorIndex = 3′Highlights in red color if any changes in cells
Else
cell.Interior.ColorIndex = 0
End If
Next
set objExcel=nothing

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

How to capture Text form the webpage?

How to capture Text form the webpage?

you can use GetROProperty method to retrive runtime values inside an
object.
IF your application is web based..
runtimeValue=B("X").P("X").WebEdit("x").GetROProptery("name of the
property which value you want to retrive").. for that use GUI spy

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

QTP Interviews Questions

• Import and Export of files.
• Random testing of 500 test cases.
• Invoking of application
• Opening notepad in QTP &Writing of Test Result in Notepad.
• Merging of Two Repositories
• Data file / Verification of data file when file is not available
in local system.
• Business process component / Types and usage.
• Opening of notepad in QTP to write and execute the coding.
• How to find local host name using QTP
• How to handle exception when data table is not available in local
host system or Path is not correct (Explain Statement with example)
• Runtime dynamic settings.
• Script generated after applying database check point.
• Script generated at the time of setting runtime property.
• Types of exception handling and script for that.
• Scripting

Friday, May 20, 2011

Reasons why we should (or shouldn’t) automate a test?

Below are some factors to consider to help identify which manual tests should or should not be automated. Just because you can automate something doesn’t necessarily mean that you should. Here are some guidelines to help identify good candidates for test automation:

Tests that should be automated:

Tests that need to be run against every build/release of the application, such as smoke test, sanity test and regression test.
Tests that utilize the same workflow but different data for its inputs for each test run (data-driven and boundary tests).
Tests that need to gather multiple information during run time, like SQL queries and low-level application attributes.
Tests that can be used for performance testing, like stress and load tests
Tests that take a long time to perform and may need to be run during breaks or overnight. Automating these tests maximizes the use of time.
Tests that involve inputting large volumes of data.
Tests that need to run against multiple configurations — different OS & Browser combinations, for example.
Tests during which images must be captured to prove that the application behaved as expected.

Important: Remember that the more repetitive the test run, the better it is for automation

Tests that should not be automated:

User experience tests for usability (tests that require a user to respond as to how easy the app is to use).
Tests that you will only run one-time. (This is a general rule. I have automated one–time tests for data population situations in which the steps can be automated quickly, and when placing in a loop can produce thousands of records, saving a manual tester considerable time and effort)
Test that need to run ASAP.
Tests that require ad hoc/random testing based on domain knowledge/expertise.
Tests without predictable results. For automation validation to be successful, it needs to have predictable results in order to produce pass and fail conditions.
If a test needs to be manually “eyeballed” to determine whether the results are correct.
Test that cannot be 100% automated should not be automated at all — unless doing so will save a considerable amount of time.
What would you add or remove from this list? Let me know.

QTP 11 patch – Fixes .NET, BPT, Service Test and other issue

If we are using QuickTest Pro 11 I highly recommend that you install patch QTP_00709. The patch fixes the following issues:



1. If the QTP_00699 - Support Testing on 64-Bit Applications (For Specified Technologies) patch was not installed on 64-bit operating systems, all .NET 4.0 controls on 32-bit applications were recognized as SwfObjects.

2. Recovery scenarios did not work in BPT wrapper tests.

3. Run-time errors were displayed if you ran a business component that contained a QCUtil.CurrentTest.Name step.

4. Function libraries that were created from an application area, opened in read-only mode.

5. In Quality Center 10.00, the Parameters of Test dialog box opened when you added QuickTest 11.00 tests to the execution grid.

6. If a QuickTest test called a Service Test test (and both tests were stored in Quality Center), the run results for the Service Test test were not uploaded to Quality Center at the end of the run session.

7. If you renamed a QuickTest action after inserting a call from it to a Service Test test, an error occurred during the run session.

8. QuickTest crashed or an OS blue screen appeared when using a User-Defined / Non-HLLAPI emulator on Windows 7 with Office 2007/2010 installed.

9. You could not view the baseline history for scripted components that were stored in version control-enabled Quality Center projects.

10. In QuickTest, if you tried to delete an application area that was associated with one or more components, QuickTest mistakenly opened a message box asking you to confirm the deletion of the application area instead of informing you that the application area is in use and providing you with further instructions. This occurred only if the application area was moved to a different location in the Quality Center/ALM Test Resources module after a component was associated with it.

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

Why is QTP 11 results viewer is taken more time?

If you’ve upgraded to QTP 11 recently and are finding that the Results Viewer is taken a long time to display test results, then you should install HP’s hotfix RRV_00013. This patch will fix the following issues:

1. Reduces the amount of time it takes to open large run results.
2. Reduces the amount of time it takes to export large run results.
3. Displays the data table in results for business process tests created using Quality Center 10.00.
4. Provides support for multiple icon file types (in addition to *.ico) including *.png, *.jpg, and *.gif.
5. Fixes various issues that prevented the run results tree from being displayed correctly.
6. Fixes an issue that sometimes caused the Run Results Viewer to crash.

To get the hotfix RRV_00013, contact HP, or you can download it from here


for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

Why is QTP working very slowly in my machine?

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

There are times when the local user and temporary directory files have a problem and they need resetting to resolve the issues

Below process will reset all setting for the current user of QuickTest Professional. This will not remove QuickTest Professional from a machine. The batch file will back up the QuickTest Professional registry setting for the local user in a directory created in the procedure below. Note some of the custom setting for user preference will be lost during running of this command file.

Download the file from http://www.ftporasi.com/HP%20Utilities/ClearQTPUser.cmd File location confirmed.

1.Download file.
2.Ensure user has local admin rights before running batch file.
3.Create a directory to place this file in like C:\QTPClearUser
4.Stop QuickTest Professional if running.
5.Open Dos Prompt and go to directory created above.
6.Run the file batch file.
7.Recommend rebooting
8.Start QuickTest Professional to see if issue has been resolved.

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

Saturday, May 14, 2011

What is Reporter Objects in QTP?

Reporter Object is used for sending information to the test results. With the help of this object you can:
>Report the status of test results (like pass, fail, warning)
>Enable/Disable reporting of step(s) following the statement.
>Retrieve the folder path in which the current test's results are stored.
>Retrieve the run status at the current point of the run session.
There are some very important methods and properties associated with it.
ReporterEvent Method:

I think this is a very common method used with Reporter object. I am sure even if you have worked on QTP for a relatively short period, you would have come across this.
Its syntax:
Reporter.ReportEvent EventStatus, ReportStepName, Details
where EventStatus can be:
0 or micPass: If this step runs test passes which is shown in test report.

1 or micFail: If this step runs test fails which is shown in test report.

2 or micDone: Used to send message to the test report and does not affect status of test.

3 or micWarning: Again, used to send warning message to the test report and does not affect status of test.
and
ReportStepName is name of step
and
Details are the user defined details for the given step.
For Example:
Reporter.ReportEvent micPass, "Login Authorization", "The user-defined step passed."
Filter property

I have mentioned this on my other post Some Useful Tips with QTP but would like to mention it again here since I get a lot of questions on this.
There can be situations where you don't want the full status displayed on the test report. This property can be used to selectively filter the status of your tests.
Its syntax:
Reporter.Filter = NewMode
where NewMode can be:

0 or rfEnableAll: This is the default mode. All reported events are displayed in the Test Results.

1 or rfEnableErrorsAndWarnings: Only those events with a warning or fail status are displayed in the Test Results.

2 or rfEnableErrorsOnly: Only those events with a fail status are displayed in the Test Results.

3 or rfDisableAll: All events in the Test Results are disabled.
ReportPath Property

This is used to get the path in which current test results are stored.
Its syntax:

Path_of_Results = Reporter.ReportPath
RunStatus Property

This is used to get the current status of the run session
Its syntax:
Reporter.RunStatus
For Example:
if Reporter.RunStatus = 0 then flag=1;

QTP Certification Dumps

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/
Q1. 'Browser navigation timeout' is in which tab of Test Settings (File->Settings) window.
A) PropertiesB) ResourcesC) WebD) Web Settings

Q2. How many tabs are there in Test Settings (File->Settings) window
A) 7B) 6C) 5D) 8

Q3. Identify the tabs in the Test Settings (File->Settings) window
A) Properties, Run, Resources, Parameters, Environment, Web, Recovery
B) Properties, Run, Resources, Parameters, Environment, WebSettings,Recovery
C) Properties, Run Options, Resources, Parameters, Environment, Web,Recovery
D) Properties, Run, Resources, Input Parameters, Environment, Web, Recovery

Q4. 'Generate Script' is in which tab of Test Settings (File->Settings)window
A) PropertiesB) WebC) ResourcesD) Recovery

Q5. The following are the four main columns in the Keyword view
A) Item, Operation, Value, CommentsB) Item, Operation, Value, DocumentationC) Item, Operation, Property, DocumentationD) Number, Operation, Value, Documentation

Q6. For each object and method in an Expert View statement, acorresponding row exists in the Keyword View.A) TrueB) FalseC) There is a problem with the statement.D) None of above

Q7. You can work on one or several function libraries at the same time.A) TrueB) False

Q8. You can insert additional steps on the test objects captured in the Active screen after the recording session. A) TrueB) False

Q9. The Active Screen enables you to parameterize object values andinsert checkpointsA) TrueB) False

Q10. A QTP user can increase or decrease the active screen informationsaved with the test.A) TrueB) False

Q11. The Information pane provides a list of............. in the test:A) Semantic errorsB) Syntax errorsC) Common errorsD) Logic errors

Q12. When we switch from Expert view to the Keyword view, QTPautomatically checks for syntax errors in the test and shows them in theinformation pane.A) TrueB) False

Q13. If the information pane is not open, QTP automatically opens it incase a syntax error is detected.A) TrueB) False

Q14. ..................... provides a list of the resources that arespecified in your test but cannot be found.A) Missing paneB) Missing Resources paneC) Resources paneD) Missing Items pane

Q15. Whenever you open a test or a function library, QTP automaticallychecks for the availability of specified resources.A) TrueB) False

Q16. The Data Table does not assists you in parameterizing your test.A) TrueB) False

Q17. Tabs in the Debug Viewer pane are:A) Watch, Variables, DebugB) Watch, Data, CommandC) Watch, Variables, CommandD) View, Variables, Command
Q18. ............... tab enables you to view the current value of anyvariable or VBScript expression.
A) Watch
B) VIew
C) Locate
D) Current

Q19. The .... tab displays the current value of all variables that havebeen recognized up to the last step performed in the run session.
A) View
B)Variables
C) Locate
D) Current

Q20. The .........tab enables you to run a line of script to set ormodify the current value of a variable or VBScript object in your testor function library.
A) View
B) Variables
C) Command
D) Current

Q21. Panes in QTP can have one of the following states—docked or floating.
A) True
B) False

Q22. Which of the following statement is True:
A) QuickTest enables you to open and work on one test at a time
B) QuickTest enables you to open and work on two tests at a time
C) QuickTest enables you to open and work on predefined number of testsat a time
D) QuickTest enables you to open and work on nine test at a time

Q23. Which of the following statement is True:
A) You can open and work on two function libraries simultaneously
B) You can open and work on multiple function libraries simultaneously
C) You can open and work on nine function libraries simultaneously
D) You can open and work on one function library at a time

Q24. You can open any function library, regardless of whether it isassociated with the currently open test.
A) True
B) False

Q25. You can work with multiple documents (test, component, orapplication area, function libraries) using the...... dialog box
A) Panes
B) Display
C) Show
D) Windows