1. Explain the concept of how QTP identifies object.
QTP uses the Object Repository file to recognize objects on the application. When QTP runs a action, it uses the Object Repository to locate objects. It reads an objects description in the Object Repository and then looks for an object with the same properties in the application being tested
2. Differentiate the two Object Repository Types of QTP.
In Qtp there are 2 types of object repositories.
1. Shared Object Repository2. Per Action Mode,
By default it's per action mode. We will use shared OR for calling a particular action, it’s like calling external libraries. We will use per action for a particular action i.e., for one action only.
3. What is logical name of the object
Logical name is a name or description given by the tool while creating an object to uniquely identify it from other objects in the application. This name would be used by the tool to identify the object during run session. Labels take the place of logical names most of the times.
4. Explain the concept of object repository & how QTP recognizes objects?
While recording a script QTP recognizes the objects by its properties. These objects properties and values are stored in Object repository. When you run your test, QTP compares these objects properties with the run time objects properties.
5. How many types of recording modes in QTP? Describe each type with an example where we use them?
There are three types of recording modes available in Quick Test Pro.
1. Normal
2. Analog
3. Low-level Recording
Normal mode: This is the default mode of recording in QTP , Object and the Operation associated/performed with Object can be recorded. This mode takes full advantage of Quick Test’s test object model, recognizing the objects in AUT regardless of their location on the screen.
Analog mode: This mode records exact mouse and keyboard operations you perform in relation to the screen / application window. This mode is useful for the operation which you can record at object level, such as drawing a picture, recording signature. The steps recoded using Analog mode are saved in separate data-file, Quick tests adds to your test a Run Analog file statement that calls the recorded Analog file. This file is stored with your action in which these Analog steps are created. The steps recorded in Analog mode can not be edited within Quick Test.
Low-level recording mode: Enables you to record any object or operation in your AUT whether or not Quick Test recognizes it. This Low-level recording is useful when the exact location of an Object/operation in your AUT is important for your test. This mode records in terms of X, Y co-ordinates. Unlike in Analog mode, the steps can be seen in Test script, as well in Keyword view.
6. Explain what the difference between Shared Repository and Per Action Repository
Shared Repository: Entire application uses one Object Repository , that similar to Global GUI Map file in Win Runner Per Action: For each Action ,one Object Repository is created, like GUI map file per test in Win Runner
7. How does Parameterization and Data-Driving relate to each other in QTP?
To data drive we have to parameterize. i.e. we have to make the constant value as parameter, so that in each iteraration (cycle) it takes a value that is supplied in run-time data table. Through parameterization only we can drive a transaction (action) with different sets of data. You know running the script with the same set of data several times is not suggestible, it's also of no use.
8. How to use the Object spy in QTP 8.0 version?
There are two ways to Spy the objects in QTP 1). By File Tool Bar: In the File Tool Bar click on the last toolbar button (an icon showing a person with hat). 2).By Object Repository Dialog : In Object Repository dialog click on the button “object spy..." In the Object spy Dialog click on the button showing hand symbol. 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.
9. How can we do block commenting in QTP?
Selecting the block and press (ctrl + M)
10. Difference Between Text and Text Area checkpoints in QTP
Text checkpoint enables us to check that the texts displayed in a screen , window, or web page , according to specified criteria. it is supported for all environments.Text area checkpoint enables us to check that a text string appears within a defined areas in windows applications, according to specified criteria. it is supported for standard windows, visual basic and active x environments
11. What are different execution modes available in QTP & explain them.
There are 3 execution mode in QTP they are:1. Normal : The default mode where expected & actual results are verified & output is given.2. Update: When u want to update the expected result then update mode is used.3. Debug : This requires Microsoft debugger..
12. How to test Dynamic web pages using QTP
If you know the one property of the object .That is sufficient for the QTP to identify the object. If you know the one object property. At that time we need to use object identifier to identify the object we need to add some more properties of the object. To give unique identification for the object ,or we need to go for the descriptive programming ,it bypass the object repository
13. What is the advantage and disadvantage of using Virtual Object wizard? How efficiently we can use Virtual object Wizard in QTP?
By using Virtual object Wizard we can map Custom Objects (objects which are not recognized by QTP) to Standard Class.This help to insert checkpoints and for doing DDT for that objects
14. Without recording objects in Object Repository are we able to run scripts?
Absolutely not!! Qtp recognizes the code through the objects of the object repository. It’s like central repository to the tool.
15. What is difference between stub and driver?
Stub and driver is temporary programs which use to testing.STUB : When main program is ready and sub modules are not ready at that time tester create temporary program, which is called as "STUB". Then connect main program with stub. Afterword performs testing.DRIVER: When sub modules are ready and main program is not ready then software tester create driver, temporary program to connect sub modules for testing.
16. What are the disadvantages or drawbacks in QTP?
QTP requires more memory. And some knowledge of VB Script programming to create functions in project.
17. What are environment variables in qtp?
There are two types of environment variables in QTP1). BuiltIn2). User defined
18. Explain in detail the concept of synchronization.
Synchronization is the coordination between QTP script and application under test. Making script and application run together is synchronisation.Sometimes application takes some more time to complete the transaction, to ensure that script also to wait for some more time we use the concept of synchronization.
19. What are the advantages and disadvantages of global data sheet and local action sheet?
If your test script has got only one Action there is not much of a difference in choosing the datasheets, if your test script contains different action for different functionalities then the global & local data sheet comes into picture.
20. How to handle an exception in a script without using Recovery Manager?
Without recovery scenario manager, we can handle exception part in qtp through error object and on error resume next statement which is provided by vbscript.On Error Resume Next : Causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.Using "Err" object msgbox "Error no: " &" " & Err.Number & " " & Err.description & " " & Err.Source & Err.HelpContext






