21.Different types of QTP test assets and their extensions:
Test Asset
|
Extension
|
Test File
|
.mts
|
Shared Object
Repository
|
.tsr
|
Recovery
scenario
|
.ors
|
Function
Library
|
.ofl
|
Results
|
.xml
|
Local Object
Repository
|
.mtr
|
Test Batch
Runner
|
.mtb
|
22.Technologies supported by QTP?
Web, Java (Core and Advanced), .Net, WPF, SAP, Oracle, Siebel, PeopleSoft, Delphi, Power Builder, Stingray 1, Terminal Emulator, Flex, Web Services, Windows Mobile, VisualAge Smalltalk, Silverlight and mainframe terminal emulator
23.Does QTP run in any environment?
No, QTP works only in the windows environment.
No, QTP works only in the windows environment.
24.Explain the views in the QTP GUI?
Keyword view: This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are: item, operation, value and documentation.
Expert view: As the name indicates, this view is for more technical users who would want to tweak the source code as per their requirements.
Keyword view: This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are: item, operation, value and documentation.
Expert view: As the name indicates, this view is for more technical users who would want to tweak the source code as per their requirements.
25.What is QTP’s model for test creation?
a) Determine testing needs – Define testing environment, Analyse your application and plan actions
b) Set up repositories – Local or Shared OR
c) Define function libraries
d) Generate test steps – Add steps, Add checkpoints
e) Data drive your tests
f) Run the tests
a) Determine testing needs – Define testing environment, Analyse your application and plan actions
b) Set up repositories – Local or Shared OR
c) Define function libraries
d) Generate test steps – Add steps, Add checkpoints
e) Data drive your tests
f) Run the tests
26.What are the different kinds of test steps?
5 types of steps:
- Test Object ( Performs actions on a TO)
- Functions
- Utility (Steps to control run session. Eg: Reporter.report)
- Comment
- Programming logic (Loop, conditions…etc)
5 types of steps:
- Test Object ( Performs actions on a TO)
- Functions
- Utility (Steps to control run session. Eg: Reporter.report)
- Comment
- Programming logic (Loop, conditions…etc)
27.What are the different ways to invoke an application using QTP?
a) SystemUtil.Run
Run ( FileName, Parameters, Path, Operation )
Example:
SystemUtil.Run(“iexplorer.exe”,http://www.google.com)
SystemUtil.Run(“test.txt”, “”,”C:\”,”1”)
b) InvokeApplication
Example: InvokeApplication “C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.google.com”
c) Creating a shell object using VB Script
Example: Create a “WScript.shell” object.
Dim testshell
Set testshell= CreateObject (“Wscript.shell”)
testshell.run “%windir%\notepad “
a) SystemUtil.Run
Run ( FileName, Parameters, Path, Operation )
Example:
SystemUtil.Run(“iexplorer.exe”,http://www.google.com)
SystemUtil.Run(“test.txt”, “”,”C:\”,”1”)
b) InvokeApplication
Example: InvokeApplication “C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.google.com”
c) Creating a shell object using VB Script
Example: Create a “WScript.shell” object.
Dim testshell
Set testshell= CreateObject (“Wscript.shell”)
testshell.run “%windir%\notepad “
28.What are the different recording modes and how do they work?
QTP provides 3 modes of recording:
QTP provides 3 modes of recording:
- Normal Recording mode– The default recording method is always the normal mode. This method uses the model of Test Objects and Runtime objects to learn and act on the AUT.
- Analog recording mode– records the exact mouse and key strokes that the user performs in relation to either the screen or AUT window. The steps that are recorded using this method cannot be edited.
The way this usually gets represented in a code is:
Window/app.RunAnalog “Track1”.One scenario in which this type of recording can be used is when we are trying
to capture a signature. - Low Level recording mode– This mode records the co-ordinates in the application where the operation is performed, irrespective of whether QTP recognizes the specific Object or Operation.
29.Which recording modes need more memory?
Analog and Low-level recording modes
Analog and Low-level recording modes
30.Is it possible to switch between recording modes during a test creation?
Yes, in the middle of recording, we can switch to Analog/Low-level mode, finish the task required and go back to normal recording. The switch to Analog mode is available only during recording and not during editing
Yes, in the middle of recording, we can switch to Analog/Low-level mode, finish the task required and go back to normal recording. The switch to Analog mode is available only during recording and not during editing
31.Does Low level recording capture mouse movements?
No. Mouse movements are not captured.
No. Mouse movements are not captured.
32.How does QTP identify an object?
QTP has a predetermined set of properties that it learns/stores for every class of object it identifies. There are 3 aspects to this:
QTP has a predetermined set of properties that it learns/stores for every class of object it identifies. There are 3 aspects to this:
- Mandatory properties:This is the list of properties for a certain class that QTP always stores. We could say that this is the object description. It also checks this in conjunction with the parent object to see if the description is sufficient to identify the object uniquely.
- Assistive properties:In case the description of mandatory properties is insufficient to identify the Object a set of non-mandatory properties will be added to the description one after the other until there is enough data to identify the object.
- Ordinal Identifier:If the assistive properties also do not result in unique identification of an object a special ordinal identifier is added by QTP, such as the object’s location on the page or in the source code.
33.What is Smart identification?
If the recorded description does not enable QTP to identify a specific object then QTP uses “Smart identification” mechanism. It uses the following additional properties to identify the object
a) Base Filter Properties (primary) – The set of properties that cannot be changed without changing the object type
b) Optional Filter Properties (secondary) – additional properties that help identify the object uniquely.
If the recorded description does not enable QTP to identify a specific object then QTP uses “Smart identification” mechanism. It uses the following additional properties to identify the object
a) Base Filter Properties (primary) – The set of properties that cannot be changed without changing the object type
b) Optional Filter Properties (secondary) – additional properties that help identify the object uniquely.
34.What is Object Spy?
Object Spy is an extremely helpful tool that QTP has to view the properties and operations of an object in the AUT. It shows all the properties of the object and the corresponding values. It also shows the object hierarchy. It also has a provision that lets the users add a certain object to the OR.
Object Spy is an extremely helpful tool that QTP has to view the properties and operations of an object in the AUT. It shows all the properties of the object and the corresponding values. It also shows the object hierarchy. It also has a provision that lets the users add a certain object to the OR.
35.What is an object repository?
OR is like a warehouse where all the objects in a test are stored. OR has the list of Objects that QTP learned during the record process and the class to which they belong. It stores the set of properties that uniquely identifies the Object (description) and also names the object for the sake of identification in our test, based on its most prominent feature.
OR is like a warehouse where all the objects in a test are stored. OR has the list of Objects that QTP learned during the record process and the class to which they belong. It stores the set of properties that uniquely identifies the Object (description) and also names the object for the sake of identification in our test, based on its most prominent feature.
36.What are the two types of repositories available, explain them?
- Local and shared repository – these are the two kinds of available repositories.
- Every action by default has a local repository of its own and has all the objects that are used within it.
- Alternately, the tester can have a common repository for multiple actions so that all of them can share the objects that it contains. The common repository is called a shared OR.
37.An action has both shared and local OR associated to it and both have the same object in them. In the test which one will be considered?
If a local OR and Shared OR have an object with the same name, the action will consider the object in its local OR.
If a local OR and Shared OR have an object with the same name, the action will consider the object in its local OR.
38.Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?
There can be more than one Shared OR’s associated to the same action. If Shared OR1 and Shared OR2 have one object named OBJ1 each and if the action calls for OBJ1 then the order in which the shared ORs were associated will be considered. That means, if Shared OR1 was first associated then the OBJ1 from Shared OR1 will be taken into account.
There can be more than one Shared OR’s associated to the same action. If Shared OR1 and Shared OR2 have one object named OBJ1 each and if the action calls for OBJ1 then the order in which the shared ORs were associated will be considered. That means, if Shared OR1 was first associated then the OBJ1 from Shared OR1 will be taken into account.
39.Can the user toggle between using Local OR and shared OR for the same action?
Yes, it is possible to switch between one or the other types of ORs at any time. To do so, the menu option is Test->Settings->Resources and choosing the options accordingly.
Yes, it is possible to switch between one or the other types of ORs at any time. To do so, the menu option is Test->Settings->Resources and choosing the options accordingly.
40.Are Shared ORs read only?
By default, shared ORs open as read only. To open them in order to edit them you will have to open them from Object Repository Manager.
“ORM->File->Enable Editing”
By default, shared ORs open as read only. To open them in order to edit them you will have to open them from Object Repository Manager.
“ORM->File->Enable Editing”
41.What are the features and benefits of Quick Test Pro(QTP)?
1. Key word driven testing
2. Suitable for both client server and web based application
3. VB script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features
1. Key word driven testing
2. Suitable for both client server and web based application
3. VB script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features
42.How to handle the exceptions using recovery scenario manager in QTP?
You can instruct QTP to recover unexpected events or errors that occurred in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps
You can instruct QTP to recover unexpected events or errors that occurred in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps
- Triggered Events
- Recovery steps
- Post Recovery Test-Run
43.What is the use of Text output value in QTP?
Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.
Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.
44.How to use the Object spy in QTP 8.0 version?
There are two ways to Spy the objects in QTP
There are two ways to Spy the objects in QTP
- Thru file toolbar: In the File ToolBar click on the last toolbar button (an icon showing a person with hat).
- Thru Object repository Dialog: In Objectrepository dialog click on the button “object spy…” In the Object spy Dialog click on the button showing hand symbol. The pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object. If at all the object is not visible or window is minimized then hold the Ctrl button and activate the required window to and release the Ctrl button.
45.What is the file extension of the code file and object repository file in QTP?
File extension of
File extension of
- Per test object rep: filename.mtr
- Shared Object rep: filename.tsr
- Code file extension id: script.mts
46.Explain the concept of object repository and how QTP recognizes objects?
Object Repository:
Object Repository:
- Displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected).
- we can view or modify the test object description of any test object in the repository or to add new objects to the repository.
Quicktest learns the default property values and determines in which test object class it fits. - If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description. If no assistive properties are available, then it adds a special Ordianl identifier such as objects location on the page or in the source code.
47.What are the properties you would use for identifying a browser and page when using descriptive programming?
- “name” would be another property apart from “title” that we can use. OR
- We can also use the property “micClass”.
ex: Browser(“micClass:=browser”).page(“micClass:=page”)
FabGreen Technologies,Madivala-
FabGreenTechnologies.com
FabGreenTechnologies.com
No comments:
Post a Comment