content top

comparator vs comparable

Comparable:
A comparable object is capable of comparing itself with another object. The class itself must implements the java.lang.Comparable interface in order to be able to compare its instances. This interface imposes a total ordering on the objects of each class that implements it. This ordering is referred to as the class’s natural ordering, and the class’s compareTo method is referred to as its natural comparison method.

Comparator:

Comparator is an interface which is used for total ordering for some collection of objects. If you don’t rely on natural ordering that is done by class’s by implementing the comparable interface, you can define your custom comparator.

It is also useful when you have a predefined class in some jar library that don’t have implementation of comparable interface or that implementation is not as per your requirement. In that case you can use comparator for ordering.

Will post the example later…

Read More

QTP Certification Sample Questions

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

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 availiblity 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

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

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

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

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

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)

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

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

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

ACTIONS

101) A test comprises calls to actions. When you create a new test, it contains a call to a …… action.

A) One
B) Two
C) Three
D) Multiple

102) When you open a test, you can choose to view ……

A) the test flow (calls to actions)
B) you can view and edit the individual actions stored with your test.
C) Both A & B
D) None

103) For every action called in your test, QuickTest creates a corresponding …….. in the Data Table so that you can enter Data Table parameters that are specific to that action only.

A) action sheet
B) Excel sheet
C) Both A & B
D) None

104) When you create a test, it includes ….. action.

A) Single
B) unlimited
C) Three
D) Multiple

105) There are three kinds of actions:

A) non-reuse action, reuse action, external action
B) Call to internal action, Call to reusable action, external action
C) non-reusable action, reusable action, external action
D) Call to non-reusable action, reusable action, external action

106) By default, new actions are

A) Short
B) External
C) reusable
D) non-reusable

107) You can display or hide the Action toolbar in the Keyword View by choosing ……..

A) View > Toolbars > Action
B) View > Toolbars > Actions
C) View > Toolbar > Action
D) Views > Toolbars > Action

108) The …… enables you to view either the entire test flow (the calls to the actions in the test) or you can view the steps for a selected reusable or external action.

A) Action Flow
B) Action file
C) Action List
D) Action Repository

109) In the ……., the Action List is always visible and the Expert View always displays the script for the selected action.

A) Keyword View
B) Expert View
C) Action Flow
D) Action View

110) If the action is called more than once within the test flow or if the action is called by a reusable action, the Reusable action option is ……

A) read-only
B) write-only
C) both read and write
D) read-write-executable.

111) You cannot expand …… actions from the test flow view.

A) reusable
B) non-reusable
C) both A & B
D) None

112) You can associate shared object repositories with …… actions simultaneously, using the Associate Repositories dialog box

A) seven
B) Two
C) Three
D) Multiple

113) 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

114) Sometimes you may want to call an action from within an action. This is called …….

A) Reusability
B) Nesting
C) Sharing
D) None

115) 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

116) 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

117) 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

18) You can also press …… to open the Rename Action dialog box

A) Shift + F2
B) Shift + F3
C) Shift + F4
D) Shift + F5

119) 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

120) With QuickTest Professional 9.0, a maximum of ………. Actions can be placed into a script

A) 110
B) 256
C) 120
D) 512

121) Only the file name …… is recognized as an action template

A) ActionTemplate.mst
B) Action_Template.mst
C) Action-Template.mst
D) ActionTemplates.mst

OBJECT REPOSITORY

122) You can import and export object repositories from and to …. files.

A) XML
B) MTS
C) TSR
D) XLS

123) 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

124) 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

125) 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

126) 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

127) 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

128) 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

129) ObjectRepositoryUtil Object Enables you to manipulate …..object repository files from outside of QuickTest Professional.

A) Shared
B) Local
C) Both
D) None

130) 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

131) GetTOProperty method returns the value of a specified property for a test object from the Object Repository.

A) True
B) False

132) 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.

133) 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

134) 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

135) 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

136) 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

137) The Object Repository Manager enables you to open …… shared object repositories and modify them as needed

A) multiple
B) three
C) two
D) Seven

138) …….. Method Loads the specified object repository.

A) Overload
B) Load
C) Both A & B
D) None

139) 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
140) 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

141) 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

142) 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

143) ……………. 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 Property

SYNCHRONIZATION

144) If you do not want QuickTest to perform a step or checkpoint until an object in your application achieves a certain status, you should insert a ………. point to instruct QuickTest to pause the test until the object property achieves the value you specify

A) Synchronization
B) Check
C) Smart Identification
D) none of above

145) Where do we Specify the Maximum Time to Wait for a Web Page to Load

A) File->Settings, Web Tab.
B) Tools->Options, Web Tab.
C) Resources->Settings, Web Tab
D) None of above

146) You can insert …….. statements that instruct QuickTest to wait until an object exists

A) Exist
B) Wait
C) Both A & B
D) None

147) …… Method Waits for the browser to complete the current navigation.

A) Exist
B) Wait
C) WaitProperty
D) Sync

148) Sub Sync_Example()
Browser(“Mercury Tours”).Page(“Mercury Tours”).Sync
End Sub

The above example uses the Sync method to wait for the Mercury Tours page to synchronize before performing the next operation.

A) True
B) False

149) …..Property- The period of time QuickTest waits before checking the emulator status (in milliseconds).

A) SyncTime
B) Sync.Time
C) TimeSync
D) Time.Sync

150) ……. Property- Indicates whether QuickTest beeps after performing each Sync function during a run session.

A) BeepAfterSync
B) BeepOnSync
C) BeepSync
D) Beep.Sync

151) Unlike the Exist method, the ……. method enables you to synchronize the test run based on a specific object property.

A) WaitProperty
B) Wait
C) Sync
D) Exit

152) …… Statement – Initiates a pause during a run session.

A) WaitProperty
B) Wait
C) Sync
D) Exit

153) ……….. Property – The maximum time (in milliseconds) that QuickTest waits for a Web page to load before running a step.

A) BrowserTimeout
B) Browser_Navigation_Timeout
C) BrowserNavigationTimeout
D) Browser_Timeout

CHECKPOINTS

154) The …….. checks a variety of objects such as buttons, radio buttons, combo boxes, lists, and so forth.

A) Image checkpoint
B) standard checkpoint
C) Bitmap checkpoint
D) Accessibility checkpoint

155) You create an image checkpoint by inserting a …….. on an image object.

A) Image checkpoint
B) standard checkpoint
C) Bitmap checkpoint
D) Accessibility checkpoint

156) ……… are also supported for some list view objects, such as WinListView and VbListView, as well as other list view objects in external add-in environments.

A) Table checkpoints
B) standard checkpoints
C) Accessibility checkpoints
D) XML checkpoints

157) …….identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines.

A) Accessibility Checkpoint
B) standard checkpoints
C) Database checkpoints
D) Accessible Checkpoint

158) …….. Specifies the time interval (in seconds) during which QuickTest attempts to perform the checkpoint successfully.

A) Check timeout
B) Checkpoint interval timeout
C) Checkpoint timeout
D) Quicktest timeout

159) ……….. Specifies when to perform the checkpoint in the test.

A) Insert statement.
B) Check statement.
C) timeout statement.
D) checkpoint statement.

160) You can view the results of the checkpoint in the ……..

A) Test Results window
B) Checkpoint window
C) Information Pane
D) Checklist window

161) By default, the bottom right part of the Test Results window displays information on the selected checkpoint only if it has the status Failed.

A) True
B) False

162) You can also use the ……… to check specific property values.

A) CheckProperty method
B) CheckItemProperty method
C) ItemProperty method
D) Property method

163) If you want to retrieve the return value of a checkpoint (a boolean value that indicates whether the checkpoint passed or failed), you must add ……… the checkpoint argument in the statement in the Expert View.

A) parentheses around
B) Properties with
C) Arguments with
D) Values alongwith

164) You can use a formula in a checkpoint to confirm that an object created on-the-fly (dynamically generated) or another variable object in your Web page or application contains the value it should for a given context.

A) True
B) False

165) You cannot modify the settings of existing checkpoints.

A) True
B) False

DATA TABLE

166) You can edit information in the Data Table by typing directly into the table cells.

A) True
B) False

167) Each row in the table represents the set of values that QuickTest submits for the ……… arguments during a single iteration of the test or action.

A) parameterized
B) Non-parameterized
C) distributed
D) None of above

168) For every action called in your test, QuickTest creates a corresponding …….. in the Data Table so that you can enter Data Table parameters that are specific to that action only.

A) action sheet
B) Excel sheet
C) Both A & B
D) None

169) When you create a test, it includes ….. action.

A) Single
B) unlimited
C) Three
D) Multiple

170) There are three kinds of actions:

A) non-reuse action, reuse action, external action
B) Call to internal action, Call to reusable action, external action
C) non-reusable action, reusable action, external action
D) Call to non-reusable action, reusable action, external action

171) By default, new actions are

A) Short
B) External
C) reusable
D) non-reusable

172) You can display or hide the Action toolbar in the Keyword View by choosing View > Toolbars > Action.

A) View > Toolbars > Action
B) View > Toolbars > Actions
C) View > Toolbar > Action
D) Views > Toolbars > Action

173) The …… enables you to view either the entire test flow (the calls to the actions in the test) or you can view the steps for a selected reusable or external action.

A) Action Flow
B) Action file
C) Action List
D) Action Repository

174) In the ……., the Action List is always visible and the Expert View always displays the script for the selected action.

A) Keyword View
B) Expert View
C) Action Flow
D) Action View

175) ……. Method – Imports a sheet of a specified file to a specified sheet in the run-time Data Table.

A) SheetImport
B) ImportSheet
C) ImportDataTable
D) ImportTable

176) The column headings in the sheet you import must match the Data Table parameter names in the action for which the sheet is being imported. Otherwise, your test or component may fail.

A) True
B) False

177) The sheet you import automatically takes the name of the sheet it replaces.

A) True
B) False
178) The use of complex and/or nested formulas in the Data Table is supported.

A) True
B) False

179) The data your test uses is stored in the ……. Data Table, which is displayed in the Data Table pane at the bottom of the screen while you insert and edit steps.

A) design-time
B) Run-time
C) Current
D) None

180) During the run session, QuickTest creates a ……. Data Table—a live version of the Data Table associated with your test.

A) True
B) False

181) If it is important for you to save the resulting data from the run-time Data Table, you can insert a ……….statement to the end of your test to export the run-time Data Table to a file.

A) Export.Datatable
B) DataTable_Export
C) DataTable.Export
D) Both A & B

182) When you parameterize a step in a test using the Data Table, you must decide whether you want to make it a global Data Table parameter or an action Data Table parameter.

A) True
B) False

183) After running a parameterized test, you can view the actual values taken from the Data Table in the Test Results Run-Time Data Table.
A) True
B) False

184) …… Property – Returns the design-time Data Table, which enables you to modify the data that is used for the Data Table parameters in your test or business component.

A) DataTable
B) DesignTable
C) Design_Table
D) None

185) The Data Table assists you in parameterizing your test.

A) True
B) False

PARAMETERIZATION

186) You can parameterize values ….. in your test.

A) in Steps
B) in Checkpoints
C) of Action Parameters
D) Both A & B
E) All of above

187) You can parameterize values in steps and checkpoints while …… your test.

A) recording
B) editing
C) Both A & B

188) There are four types of parameters: Test/Action, Random number, Environment Variable, Regular Expression.

A) True
B) False

189) While using Test and Action Input Parameters,you can enter the parameter name in the Expert View using the Parameter utility object, in the format: ………… for the current action.

A) Parameter(“ParameterName”)
B) ParameterName(“Parameter”)
C) Parameter(“Parameter-Name”)
D) Parameter(“Parameter_Name”)

190) ….. parameters are available only for top-level actions.

A) Action
B) Environment Variable
C) Test
D) None

191) …… parameters are available for subsequent steps and for nested actions. They are defined in the action containing the steps or in the action that calls the nested action.

A) Action
B) Environment Variable
C) Test
D) Parent action

192) When specifying the name for data table parameter, the first character of the parameter name must be a ……

A) letter
B) underscore
C) number
D) both A & b

193) By outputting values to the global Data Table sheet from one action and using them as input parameters in another action, you can easily pass values from one action to another.

A) True
B) False

194) ……. parameters are especially useful for localization testing, when you want to test an application where the user interface strings change, depending on the selected language.

A) Action
B) Environment
C) Test
D) Parent action

195) You can also store environment variable files in Quality Center.

A) True
B) False

196)……. built-in environment variable that tells version of the OS on which you are working.

A) OS
B) OS_Ver
C) OSVER
D) OSVersion

197) Random number parameters are appropriate for non-numeric
values, such as text or hypertext links.

A) True
B) False

REGULAR EXPRESSION

198) Regular expressions enable QuickTest to identify objects and text strings with undependable values.

A) True
B) False

199) You can use regular expressions only for values of type string and number.

A) True
B) False

200) If you expect the value of a property to change in an unpredictable way during each run session, you can use regular expressions

A) True
B) False

201) All …….. are automatically treated as regular expressions.

A) programmatic description
B) Window
C) WinObject
D) Collection

202) If a backslash character is used before a character that has no special meaning, the backslash is ignored.

A) True
B) False

203) You can use regular expressions in the Find what and Replace with strings to enhance your search.
A) True
B) False

204) Regular Expressions can also be used with XML checkpoints.

A) True
B) False

205) What is the Regular Expression Matching Zero or More Specific Characters

A) x
B) #
C) *
D) &

VIRTUAL OBJECT

206) Virtual objects enable you to record and run tests on objects that are normally recognized by QuickTest.

A) True
B) False

207) In the test results, the virtual object is displayed as though it is a standard class object.

A) True
B) False

208) QuickTest does not support virtual objects for ……. recording.

A) analog
B) low-level
C) normal
D) both A & B
E) both A & C

209) You can use the Object Spy to view virtual object properties.

A) True
B) False

210) You cannot insert any type of checkpoint on a virtual object

A) True
B) False

211) The ………… contains all the virtual object collections defined on your computer.

A) Virtual Objects Manager
B) Virtual Manager
C) Virtual Object Manager
D) Virtual Object Wizard

212) Extention of virtual object collection files

A) .vcf
B) .vot
C) .vct
D) .vcd

213) You can remove virtual objects from your test by ……. these objects.

A) disabling recognition of
B) deleting
C) deleting virtual object collection files of
D) All of Above
E) both A & B

214) When you want QuickTest to recognize virtual objects during recording, ensure that the ……. check box in the General tab of the Options dialog box is cleared.

A) Disable recognition of virtual object Files while recording
B) Disable recognition of virtual object Collection while recording
C) Disable recognition of virtual objects while recording
D) Enable recognition of virtual objects while recording

215) QuickTest identifies a virtual object according to its ……

A) Properties
B) boundaries
C) Object Spy
D) Edges

RECOVERY SCENARIO

216) Recovery scenarios activate specific recovery operations when ……… occur.

A) Specific Errors
B) Test Errors
C) Trigger Events
D) QTP Errors

217) You can also control and activate your recovery scenarios during the run session by inserting ………….. into your test.

A) Trigger Events
B) Recovery Events
C) Recovery Statements
D) Catch Statements

218) If you choose On error in the Activate recovery scenarios box in the Recovery tab of the Test Settings dialog box, the recovery mechanism does not handle triggers that occur in the last step of a test.

A) True
B) False

219) By default, recovery scenario operations are activated only after a step returns an error.

A) True
B) False

220) A ……. is a convenient way to organize and store multiple recovery scenarios together.

A) recovery file
B) recovery folder
C) Recovery Log
D) Log File

221) The Recovery Scenario Manager dialog box enables you to create and edit recovery files, and does not let you create and manage the recovery scenarios stored in those files.

A) True
B) False

222) Each recovery scenario is represented by an icon that indicates its type.

A) True
B) False

223) The Recovery Operations screen in Recovery Scenario Wizard enables you to manage the collection of …….. in the recovery scenario.

A) recovery operations
B) recovery Files
C) Trigger events
D) All of Above

224) If you define a Restart Microsoft Windows recovery operation, it is always inserted as the last recovery operation, and you can change its position in the list.

A) True
B) False

225) If more than one scenario uses a function with the same name from different function libraries, the recovery process may fail.

A) True
B) False

Read More

QuickTest Professional Shortcut Key Reference Card

New Test CTRL + N
Record F3
Open Test CTRL + SHIFT + N
Business Component > New CTRL + SHIFT + O
Business Component > Open CTRL + SHIFT + E
Business Component > Edit CTRL + O
Run F5
Save CTRL + S
Stop F4
Analog Recording CTRL + SHIFT + F4
Low Level Recording CTRL + SHIFT + F3
Object Properties CTRL + ENTER
Value Configuration Options CTRL + F11 on a value (KV only)
Export to Zip File CTRL + ALT + S
Pause PAUSE
Import from Zip File CTRL + ALT + O
Step Into F11
Step Over F10
Step Out SHIFT + F11
Insert/Remove Breakpoint F9
Print CTRL + P
Cut CTRL + X (EV only)
Copy CTRL + C
Paste CTRL + V
Clear All Breakpoints CTRL + SHIFT + F9
Delete DEL
Edit > Cut CTRL + X
Undo Ctrl + Z (EV only)
Edit > Copy CTRL + C
Redo CTRL + Y (EV only)
Edit > Paste CTRL + V
Rename Action F2
Edit > Clear > Contents CTRL + DEL
Find CTRL + F (EV only)
Edit > Insert CTRL + I
Edit > Delete CTRL + K
Edit > Fill Right CTRL + R
Edit > Fill Down CTRL + D
Edit > Find CTRL + F
Replace CTRL + H (EV only)
Go To CTRL + G (EV only)
Bookmarks CTRL + B (EV only)
Complete Word CTRL + SPACE (EV only)
Argument Info CTRL + SHIFT + SPACE (EV only)
Edit > Replace CTRL + H
Apply “With” To Script CTRL + W (EV only)
Data > Recalc F9
Remove “With” Statements CTRL + SHIFT + W (EV only)
Insert Multi-line Value CTRL + F2 while editing cell
Checkpoint > Standard F12
Checkpoint Activate next/previous sheet
CTRL + PAGEUP/
CTRL + PAGEDOWN
Output Value > Standard Output CTRL + F12
Value View Keyword View/Expert View CTRL + TAB
Step > Step Generator F7
New Step F8 (KV only)
New Step After Block SHIFT + F8 (KV only)
Key: KV = Keyword View
Open context menu for step or SHIFT + F10
Expand all branches * [on numeric keypad] (KV only)
Expand branch + [on numeric keypad] (KV only)
EV = Expert View

Read More

Descriptive Programming in QTP

When you record an operation on an object QTP add the appropriate test object to the OR. QTP can not take action on an object until unless object descriptive is in OR.

For example, in the below statement ‘username’ is the name of an edit box. The edit box is located on the page with the name Mercury Tours, and the page was recorded in a browser with the name Mercury Tours.

Browser(“Mercury Tours”).Page(“Mercury Tours”).WebEdit(“username”)

Because each object in the OR has unique name, the object name is all you need to specify. during the run session, QTP finds the object in the OR based on its name and parent objects.

You can also achieve the same thing by using Descriptive programming with out referring OR.

When and why to use the Descriptive Programming?

Some of the situation when Descriptive programming can be consider useful:
1- The Objects in the application are dynamic in nature and need special handling to identify the object. for example, clicking on a link which changes according to the user of the application “Logout{username} ”
2- When OR is getting huge due to number of objects been added. If the size of the OR increase too much then it decrease the Performance of the QTP.
3- When you don’t want to use OR at all. Consider the following example
-Suppose we have a application that has not been developed yet.
-Suppose an application has three navigation buttons on every page “Cancel”, “Back” and “Next”, recording action on these buttons would add 3 objects per page in the OR.
4- When you want to take action on similar type of object.

There are two types of Descriptive Programming.
Static:- List the set of properties and values that describe the object directly in the VBScript Statement.
For example,
MyVar = “Some text string”
Browser(“Title:= Mercury Tours”).Page(“Title:= Mercury Tours”).WebEdit(“Name:=” &MyVar)

Note:- When using Descriptive Programming from a specific point with in a test object hierarchy, you must continue to use Descriptive Programming. If you specify a test object by its OR name after other object in the hierarchy have been specified using Descriptive Programming, QTP can not identify the object.

For example,
Browser(“Title:= Mercury Tours”).Page(“Title:= Mercury Tours”).WebEdit(“usename”)
‘username is object in OR

Dynamic:- Add a collection of properties and values to Description object, and then enter the Description object name in the statement.

For example,
Dim objDesc
Set objDesc = Description.Create
‘Now you have Description object, each description object has 3 properties “name”, “value” and “Regular Expression”

objDesc(“html tag”).value = INPUT
objDesc(“name”).value =”txt.*”
objDesc(“name”).regularexpression=”txt.*”
‘ Means an object with html tag as INPUT and name starting with txt. Now actually that “.*” was consider as regular expression So, if you want the property “name” not to be recognized as a regular expression then you need to set the “regulerexpression” property as FALSE.

Note:- When using Descriptive Programming from a specific point with in a test object hierarchy, you must continue to use Descriptive Programming. If you specify a test object by its OR name after other object in the hierarchy have been specified using Descriptive Programming, QTP can not identify the object.

Getting Child Objects:
We can use the description object to get all the objects on that page that matches that specific description. Suppose we have to check all the CheckBoxes present on the web page.

Dim objDesc
Set objDesc = Description.Create
objDesc(“html tag”).value = “INPUT”
objDesc(“type”).value = “checkbox”

Dim allChkBoxes, sglChkBox

Set allChkBoxes = Browser(“Browser”).Page(“Page”).ChildObjects(objDesc)
For each sglChkBox in allChkBoxes
sglChkBox.Set “ON”
Next

Reference: QTP user’s Guide, Version 9.5

Read More

QTP Interview Questions

1. How QTP scripts are advantageous when need to re-work the same business scenarios?
A. To record the Quick Test Professional Script on one instance and be able to execute it on any other instance. The assumption is there are no major GUI changes between the recorded and the execution instances.

2. How can you make the scripts generic and what architecture needs to be followed?
A. In order to achieve the above objective, we need to plan the Quick Test Professional script. It should have two parts:
1. Script – that is generic Quick test script.
2. Data – from the parameter file that is customer instance specific.
Eg. Imagine a business flow has a scenario
- Login to the web page
- Check mail
- Logout
1. Create data/parameter file (can be flat file [.txt] or an excel file) is instance specific.
2. Create (record/program) the QTP initialization
3. The initialization script which calls the Object repository, common function library and all QTP actions/scripts

3. How to create an individual script?
A. Record the Quick Test Professional script and modify it to make it a generic script using the following steps:
a. Set the testing options in the Test Settings Dialog box.
b. Record the script
c. Modify the script to make it generic:
i. Parameterize the hard coded values.
ii. Modify the Object Repository file with regular expressions.
iii. Add unique properties to items in the Object Repository to make recognition simpler.
iv. Insert synchronization points as required.
v. Insert checkpoints for pass/fail validation.
vi. Insert additional programming logic.
vii. Use the Common Functions.

4. What is the testing process in QTP?
A. The testing process consists of 3 main phases:
1. Gather relevant test information – Input data should be gathered.
2. Create the basic test – Record/Program the scripts in actions
3. Enhance the basic test
Use Data Driven scripts to use the script to test with different sets of data
Reusable Actions- Identify the common scenarios and make the scripts generic and reuse the scripts across different business scenarios.

5. What are different types of recording modes in QTP?
A. There are two recording modes
1. Low-level
2. Analog
Low – Level Recording:
Use Low-Level Recording when you need to record the exact location of the object on your application screen.
To record in Low-Level Recording, select “Low-Level Recording” from the “Test” menu while recording
Analog:
Use Analog Recording for applications in which the actual movement of the mouse is what you want to record.
To record in Analog mode, select “Analog Recording” from the “Test” menu while recording.

6. What is Object repository?
A. The Object Repository dialog box displays a test tree of all objects in the current action or the entire test (depending on the object repository mode you choose when you create your test). You can use the Object Repository dialog box to view or modify the properties of any test object in the repository or to add new objects to your repository.
Object Repository Modes
Per – Action Object Repository:
This is the default setting, and all tests created in QuickTest 5.6 or earlier use this mode. In this mode, QuickTest automatically creates an object repository file for each action in your test so that you can record and run tests without creating, choosing, or modifying object repository files.
Shared Object Repository:
In this mode, you can use one object repository file for multiple tests if the tests include the same objects. Object information that applies to many tests is kept in one central location. When the objects in your application change, you can update them in one location for multiple tests

7. How to select the Object repository mode?
A. To select the object repository mode
Goto Test Settings > Resource Tab to change the Object Repository Mode
The default object repository file name is default.tsr
You can change object repository mode when the Test contain no actions.

8. What is Active screen? What are the advantages of Active screen?
A. Active screen captures all the properties of the application and makes available even when offline/ when you are not connected to the application.
The main advantage is checkpoints can be added without connecting to the application

9. What are different Screen capture options available for Active screen?
A. Complete—Captures all properties of all objects in the application’s active window/dialog box/Web page in the Active Screen of each step. This level saves Web pages after any dynamic changes and saves Active Screen files in a compressed format.
Partial—(Default). Captures all properties of all objects in the application’s active window/dialog box/Web page in the Active Screen of the first step performed in an application’s window, plus all properties of the recorded object in subsequent steps in the same window. This level saves Web pages after any dynamic changes and saves Active Screen files in a compressed format.
Minimum—Captures properties only for the recorded object and its parent in the Active Screen of each step. This level saves the original source HTML of all Web pages (prior to dynamic changes) and saves Active Screen files in a compressed format.
None—Disables capturing of Active Screen files for all applications and Web pages.

10. How QTP identifies the objects in the application during runtime?
A. QTP uses different properties to identify the objects in the applications. They are:
a. Mandatory Properties
b. Assistive Properties
c. Object Identifies
d. Smart Identification

11. Explain all Object identification properties.
A. Mandatory and Assistive Properties:
During the test run, QuickTest looks for objects that match all properties in the test object description – it does not distinguish between properties that were learned as mandatory properties and those that were learned as assistive properties
Smart Identification: QuickTest uses a very similar process of elimination with its Smart Identification mechanism to identify an object, even when the recorded description is no longer accurate. Even if the values of your test object properties change, QuickTest’s TestGuard technology maintains your test’s reusability by identifying the object using Smart Identification.

12. What are Ordinal identifies. Explain in detail.
A. Ordinal Identifiers are
Index:
Indicates the order in which the object appears in the application code relative to other objects with an otherwise identical description.
Location:
Indicates the order in which the object appears within the parent window, frame, or dialog box relative to other objects with an otherwise identical description. Values are assigned from top to bottom, and then left to right.
The Web Browser object has a third ordinal identifier type:
Creation Time:
Indicates the order in which the browser was opened relative to other open browsers with an otherwise identical description.

13. What is Smart Identification?

A. Smart Identification:
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.

14. What are the properties available in Smart identification?
A. 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
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.

15. What is Object Spy? How is it used in QTP?
A. Using the Object Spy, you can view the run-time or test object properties and methods of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree. It displays the run-time or test object properties and values of the selected object in the Properties tab. It displays the run-time or test object methods associated with the selected object in the Methods tab

16. What are Run-Time Object Properties / Run-Time Object Methods?
A. Run-Time Object Properties / Run-Time Object Methods:
You can use the Object property to access the native properties of any run-time object. For example, you can retrieve the current value of the ActiveX calendar’s internal Day property as follows:
Eg. Sample code
Dim MyDay
Set MyDay = Browser(‘index’).Page(‘Untitled’).ActiveX(‘MSCAL.Calendar.7′).Object.Day

17. What are Test Object Properties / Test Object Methods?
A. Test Object Properties / Test Object Methods:
You can use the GetTOProperty and SetTOProperty methods to retrieve and set the value of test object properties for test objects in your test.
You can use the GetROProperty to retrieve the current property value of objects in your application during the test run.

18.What are User-Defined Test Object Classes. How are they mapped?
A User-Defined Test Object Classes:
The Object Mapping dialog box enables you to map an object of an unidentified or custom class to a Standard Windows class. For example, if your application has a button that cannot be identified, this button is recorded as a generic WinObject. You can teach QuickTest to identify your object as if it belonged to a standard Windows button class. Then, when you click the button while recording a test, QuickTest records the operation in the same way as a click on a standard Windows button. When you map an unidentified or custom object to a standard object, your object is added to the list of Standard Windows test object classes as a user-defined test object. You can configure the object identification settings for a user defined object class just as you would any other object class

19. What are checkpoints?
A. A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property. This enables you to identify whether your Web site or application is functioning correctly.
When you add a checkpoint, Quick Test adds a checkpoint with an icon in the test tree and adds a Check Point statement in the Expert View. When you run the test, Quick Test compares the expected results of the checkpoint to the current results. If the results do not match, the checkpoint fails. You can view the results of the checkpoint in the Test Results window.

20. What is a standard checkpoint?
A. You can check that a specified object in your application or on your Web page has the property values you expect, by adding a standard checkpoint to your test. To set the options for a standard checkpoint, you use the Checkpoint Properties dialog box.

21. What is Text or Text Area Checkpoint?

A. Text or Text Area Checkpoint Results

By adding text or text area checkpoints to your tests, you can check that a text string is displayed in the appropriate place in your application or on your Web page. When you run your test, Quick Test compares the expected results of the checkpoint to the actual results of the test run. If the results do not match, the checkpoint fails.

23. What is Bitmap Checkpoint?
A. Bitmap Checkpoints:
You can check an area of a Web page or application as a bitmap. While creating a test, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. Quick Test captures the specified object as a bitmap, and inserts a checkpoint in the test. You can also choose to save only the selected area of the object with your test in order to save disk space.

24. What is Table and Database Checkpoint?

A. Table and Database Checkpoints:
By adding table checkpoints to your tests, you can check that a specified value is displayed in a cell in a table on your Web page or in your application. By adding database checkpoints to your tests, you can check the contents of databases accessed by your Web page or application. The results displayed for table and database checkpoints are similar. When you run your test, Quick Test compares the expected results of the checkpoint to the actual results of the test run. If the results do not match, the checkpoint fails.

25. What is Accessibility Checkpoint?
A. Accessibility Checkpoints:
You can add accessibility checkpoints to help you quickly identify areas of your Web site that may not conform to the W3C (World Wide Web Consortium) Web Content Accessibility Guidelines. You can add automatic accessibility checkpoints to each page in your test, or you can add individual accessibility checkpoints to individual pages or frames.

26. What is XML Checkpoint?
A. XML Checkpoint:
The XML Checkpoint Properties dialog box displays the element hierarchy and values (character data) of the selected XML file.
Select the element(s), attribute(s), and/or value(s) that you want to check. For each element you want to check, select the checks you want to perform. For each attribute or value you want to check, select the checks you want to perform, or the parameterization options you want to set.

27. What is Synchronization?
A. When you run tests, your application may not always respond with the same speed. — For example, it might take a few seconds:
- For a progress bar to reach 100%
- For a status message to appear
- For a button to become enabled
- For a window or pop-up message to open
You can handle these anticipated timing problems by synchronizing your test to ensure that Quick Test waits until your application is ready before performing a certain step.

28. What are different functions available for Synchronization?
A. There are several options that you can use to synchronize your test:
You can insert a synchronization point, which instructs Quick Test to pause the test until an object property achieves the value you specify. When you insert a synchronization point into your test, Quick Test generates a WaitProperty statement in the Expert View.

29. What is the difference in Exists/wait statements?
A. Exist ()/ Wait()
You can insert Exist or Wait statements that instruct QuickTest to wait until an object exists or to wait a specified amount of time before continuing the test.
Eg. Browser(‘Yahoo”).Page(‘CheckMail”).Button(“CheckMail”).Exists(10)
QTP waits for 10 seconds till the button exists in the page. The script proceeds if the button even exits before 10 seconds unlike wait() statement – it waits for 10 seconds no matter the button exits before 10 seconds.

30. What is Default Time Out?
A. Default Time Out:
You can also increase the default timeout settings in the Test Settings and Options dialog boxes in order to instruct Quick Test to allow more time for certain events to occur

31. What is Parameterization (Data Table Wizard)?
A. You can supply the list of possible values for a parameter by creating a Data Table parameter. Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, Quick Test substitutes the constant value with a different value from the Data Table.

32. What are Method Arguments?
A. Using Method arguments you parameterize method arguments in the Method Arguments dialog box. to open the Method Arguments dialog box, right-click a step containing a method in the test tree and choose Method Arguments. The Method Arguments dialog box opens and displays the method arguments in the step.

33. Well, I would like to run my test with different sets of data, How can I make it with the options available in QTP?
A. Listed are the different Data Table Iterations
Run one iteration only:
Runs the test only once, using only the first row in the global Data Table.
Run on all rows:
Runs the test with iterations using all rows in the global Data Table.
Run from row __ to row __ :
Runs the test with iterations using the values in the global Data Table for the specified row range.

34. What are different data tables available?
A. 1. Global Sheet
The Global sheet contains the data that replaces parameters in each iteration of the test.
2. Action Sheets
Each time you add a new action to the test, a new action sheet is added to the Data Table. Action sheets are automatically labeled with the exact name of the corresponding action. The data contained in an action sheet is relevant for the corresponding action only.

35. What is an Action?
A. An Quick test script contains different actions. An action contains the script ie. A piece of business scenario like, login to application, logout etc.
Well again It depends on how you create your framework ( If you would like to know more about frame work check out this link. Good one. http://www-128.ibm.com/developerworks/rational/library/591.html) for testing the applications.
I would suggest every action has a piece of business scenario which would help to re-use the script in a better way. Before deciding what are re-usable scripts. Firstly, identify all the common scenarios that occur in different business flows across different modules.
Then prepare the scripts and make generic. You can call all these functions by making this common function library available at Test options > Resourses.

36. What is Copy of action?
A. Copy of Action:
When you insert a copy of an action into a test, the action is copied in its entirety, including checkpoints, parameterization, and the corresponding action tab in the Data Table. If the test you are copying into uses per-action repository mode, the copied action’s action object repository will also be copied along with the action.

37. What are re-usable actions?
A. Reusable Actions:
Determines whether the action is a reusable action. A reusable action can be called multiple times within a test and can be called from other tests. Non-reusable actions can be copied and inserted as independent actions, but cannot be inserted as calls to the original action.

38. what about Call of Action?
A. You can insert a call (link) to a reusable action that resides in your current test (local action), or in any other test (external action).

39. When to Insert transactions?
A. Inserting Transactions:
During the test run, the Start Transaction signals the beginning of§ the time measurement. You define the beginning of a transaction in the Start Transaction dialog box
- The End Transaction signals the end of the time measurement

40. What are reular expressions?
A. Regular Expressions:
Regular expressions enable QuickTest to identify objects and text strings with varying values. You can use regular expressions when:
• Defining the property values of an object
• Parameterizing a step
• Creating checkpoints with varying values
A regular expression is a string that specifies a complex search phrase. By using special characters such as a period (.), asterisk (*), caret (^), and brackets ([ ]), you can define the conditions of a search. When one of these special characters is preceded by a backslash (\), QuickTest searches for the literal character.

Here is an example:
The actual pattern for the regular expression search is set using the Pattern property of the RegExp object. The RegExp.Global property has no effect on the Test method.
The Test method returns True if a pattern match is found; False if no match is found.
The following code illustrates the use of the Test method.
Function RegExpTest(patrn, strng)
Dim regEx, retVal ‘ Create variable.
Set regEx = New RegExp ‘ Create regular expression.
regEx.Pattern = patrn ‘ Set pattern.
regEx.IgnoreCase = False ‘ Set case sensitivity.
retVal = regEx.Test(strng) ‘ Execute the search test.
If retVal Then
RegExpTest = ‘One or more matches were found.’
Else
RegExpTest = ‘No match was found.’
End If
End Function
MsgBox(RegExpTest(‘is.’, ‘IS1 is2 IS3 is4′))

41. Create a script to print the message
Dim MyVar
MyVar = MsgBox (‘Hello World!’, 65, ‘MsgBox Example’)
‘ MyVar contains either 1 or 2, depending on which button is clicked.

42. List all the run time errors in VB script.
A. VBScript run-time errors are errors that result when your VBScript script attempts to perform an action that the system cannot execute. VBScript run-time errors occur while your script is being executed; when variable expressions are being evaluated, and memory is being dynamic allocated.
Error Number Description
429 ActiveX component can’t create object
507 An exception occurred
449 Argument not optional
17 Can’t perform requested operation
430 Class doesn’t support Automation
506 Class not defined
11 Division by zero
48 Error in loading DLL
5020 Expected ‘)’ in regular expression
5019 Expected ‘]’ in regular expression
432 File name or class name not found during Automation operation
92 For loop not initialized
5008 Illegal assignment
51 Internal error
505 Invalid or unqualified reference
481 Invalid picture
5 Invalid procedure call or argument
5021 Invalid range in character set
94 Invalid use of Null
448 Named argument not found
447 Object doesn’t support current locale setting
445 Object doesn’t support this action
438 Object doesn’t support this property or method
451 Object not a collection
504 Object not safe for creating
503 Object not safe for initializing
502 Object not safe for scripting
424 Object required
91 Object variable not set
7 Out of Memory
28 Out of stack space
14 Out of string space
6 Overflow
35 Sub or function not defined
9 Subscript out of range
5017 Syntax error in regular expression
462 The remote server machine does not exist or is unavailable
10 This array is fixed or temporarily locked
13 Type mismatch
5018 Unexpected quantifier
500 Variable is undefined
458 Variable uses an Automation type not supported in VBScript
450 Wrong number of arguments or invalid property assignment

Read More

How can i import environment from a file on disk ?

Use:-

Environment.LoadFromFile “C:\Env.xml”

Read More

ISTQB-MocTest – 2

1. COTS is known as (1M)

A. Commercial off the shelf software

B. Compliance of the software

C. Change control of the software

D. Capable off the shelf software

2. From the below given choices, which one is the ‘Confidence testing’ (1M)

A. Sanity testing B. System testing

C. Smoke testing D. Regression testing

3. ‘Defect Density’ calculated in terms of (3M)

A. The number of defects identified in a component or system divided by the size of the component or the system

B. The number of defects found by a test phase divided by the number found by that test phase and any other means after wards

C. The number of defects identified in the component or system divided by the number of defects found by a test phase

D. The number of defects found by a test phase divided by the number found by the size of the system

4. ‘Be bugging’ is known as (2M)

A. Preventing the defects by inspection

B. Fixing the defects by debugging

C. Adding known defects by seeding

D. A process of fixing the defects by tester

5. An expert based test estimation is also known as (1M)

A. Narrow band Delphi

B. Wide band Delphi

C. Bespoke Delphi

D. Robust Delphi

6. When testing a grade calculation system, a tester determines that all scores from 90 to 100 will yield a grade of A, but scores below 90 will not. This analysis is known as: (1M)
A. Equivalence partitioning

B. Boundary value analysis

C. Decision table

D. Hybrid analysis

7. All of the following might be done during unit testing except (1M)

A. Desk check

B. Manual support testing

C. Walkthrough

D. Compiler based testing

8. Find the Min number of tests to ensure that each statement is executed at least once (2M)

Read More
Page 1 of 912345...Last »
content top