Dear Readers, Welcome to QTP Interview Questions and Answers have been designed specially to get you acquainted with the nature of questions you may encounter during your Job interview for the subject of QTP. These QTP Questions are very important for campus placement test and job interviews. As per my experience good interviewers hardly plan to ask any particular questions during your Job interview and these model questions are asked in the online technical test and interview of many IT companies.
A. ActiveX, Visual Basic, Web, Multimedia
A. Yes. UNI-CODE is a 16-bit machine understandable language.
A. Both. Developing the Script depends on the Test Scenario.
A. Three modes. They are Normal, Analog, and Low-level
A. Analog recording will record the Mouse & Keyboard movements with respect to the Window or Application co-ordinates. Whereas low-level recording will record the all the objects in the Application whether or not Quick Test recognizes them.
A. Analog Mode is used for Signatures.
Low – level Mode is used when your Quick test is not recognizing certain objects in your Application.
A. Test Run Mode, Update Run Mode and Debug Run Mode
A. Test Settings are settings of that particular test only.
Global Settings are settings that reflect any test in QTP.
A. Two types. Test Objects and Run Time Objects.
A. test object are basic and generic objects that QTP recognize
A. Runtime object means the actual object to which a test object maps
A. Test object are basic and generic objects that QTP recognize Runtime object means the actual object to which a test object maps
A. An Action is a series of operations to do some work. There are 3 types of Actions in QTP. They are i) Non-Reusable Action (default)
ii) Reusable Action
iii) External Action
A. In Copy to Action you will copy the Script of an Action and hence can make
necessary modifications to the script.
In Call to Action you are directly calling an Action either from the same test or from some other test. So, you can’t make any changes to the script. If you want to do any changes to the script, you need to go to that particular test and make changes.
A. An Object Repository is an interface between QTP script and the Application.
Quick Test stores all its objects’ information in Object Repository to identify them later.
A. Two types of Object Repositories are
We are using Shared Object Repository.
A. Yes, you can have problems with Object repository while identifying the objects. Also, if you are using Shared Repository, then if u r changing properties of an object which u want to reflect only in that particular action, will be reflected in all other actions of that test.
A. No, u can’t merge Object repository files with each other.
A. Per-Action Repository will store only those objects that are recorded in that Particular action. Each Action will have its own Per-Action Repository.
Shared Repository will store all the objects that are recorded during the test
Irrespective of the Actions.
A. QTP recognizes Objects through Object Repository.
A. No, changes made to objects in one Action will not be reflected in any other Action.
A. Either using Object Spy or using GetTOProperty (Property Name).
A. Yes, using SetTOProperty (property name, Value)
A. Parameterization means executing the same operation many times with different Input data.
A. Four ways. They are:
ii) Data Driver
iii) Environment variable
iv) Random Number
A. It is a Verification point that compares the current value with the expected value for a specified property of an object.
The different types of checkpoints are:
i) Standard checkpoint
ii) Text Checkpoint
iii) Text Area checkpoint
iv) Page checkpoint
v) Image checkpoint
vi) Bitmap checkpoint
vii) Table checkpoint
viii) Database checkpoint
ix) XML checkpoint
A. Image: Used to check the property of an image.
Bitmap: Used to check the selected/full image comparison.
A. If the Execution has halted at a Step for more than estimated time, then u can Estimate that the check has been failed. U need not wait for the results window to come to tell whether the result is pass or fail.
A. Text: With Text checkpoint u can check only a single string value
Text Area: With Text Area u can check multiple rows and columns of text Strings.
A. After recording particular object, just change the value and play it back. The
Checkpoint will be failed.
A. Yes. You can check the broken links through Web Testing. The navigation to check the broken links is
Tools->options->Web->Check Broken Links checkbox
A. Step 1: u need to create a Connection String Object
Step 2: u need to create a Record Set to hold the values from table
Step 3: Execute the Query
Step 4: Assign the values to the Record Set
Step 5: Close the Connection String
A. Retrieving values from the Application to the Data Table. An Output value is a step in which one or more values are captured during the run session for use to another point in the run. When any of the values is needed later in the run as input, Quick test retrieves it from the specified output location.
A. Accessibility Checkpoints are designed to help you easily locate the areas of your Web Site that require special attention according to W3C Web Content Accessibility Guidelines.
A. There is no output value for Bitmap.
A. Go to Keyword view, Select the Action (keep your mouse button pressed) and Drop it in the order you want. That will do it.
A. No, the virtual Object you created will be applicable only to that test.
A. Virtual Object will be supported only in Normal Recording. Both Analog and Low Level Recording will not support Virtual Objects.
A. No, It will not work. The application or window should be in the same position as it was at the creation time of virtual object.
A. Open QTP startup window, click on “Insert” in the menu bar, select “Call to new Action”. It will create a new Action.
A. Yes, you can split an Action. But if your action is either external or Read only, then U can’t split your action. Or if ur cursor is at the first line of ur action’s script then Also u can’t split ur action.
A. U can call actions in QTP in 2 ways.
i) Call to Copy of an action
ii) Call to External action
A. “RunAction” is the keyword used to run an action. Syntax to run an action for Particular number of times is
RunAction, Action Name, iterationQuantity
RunAction “action 1”, oneIteration
RunAction “action 2”, 1, “1-4”
A. You will have only one Shared Object Repository for all the actions. Your shared repository will never split into two. It will remain single.
A. You can pass the values of one action to another action by mentioning the input and Output values of those particular actions in Input Action parameters and Output action parameters of those actions. Navigation to specify parameters in QTP is
Test -> Settings -> Parameters Tab
A. You can exit an action before it runs in its entirety. There are 4 types of Exit action Statements you can use. They are:
i) Exit Action: Exits the current action, regardless of its iteration attributes.
ii) Exit Action Iteration: Exits the current iteration of the action.
iii) Exit Run: Exits the test, regardless of its iteration attributes.
iv) Exit Global Iteration: Exits the current Global Iteration.
You can view the Exit action node in the Test Results tree.
A. Recovery Scenario Manager will instruct Quick Test how to handle unexpected Events in the run session. If you execute your test scripts unattended then we will go for Recovery Scenario manager.
A. Trigger Events are events that interrupt you in your run session.
A. The different types of Trigger Events in QTP are:
i) Pop-Up window
ii) Object State
iii) Test Run Error
iv) Application Crash
A. In Keyword view, keep your cursor at a step and click on
Insert -> Step -> Report
Select the status from the list box, name the message and give the message to be displayed in the details box.
A. By using getItemscount method
A. There are 4 types of Status in QTP. They are
A. It is used to eliminate the anticipated timing problems between the Quick test Script and the Application. Different ways of synchronizations are:
v) Synchronization timeout
A. i) When waiting for the message box to be opened
ii) When waiting for the Web Page to be down loaded
A. Wait (10)
A. Using Object Repository.
A. Your Script will be skipped to the next step if any error occurs in the step. That step is called Optional step.
A. Yes. We can do Batch testing by selecting the tests to be included in batch and running them. To add tests to batch the navigation is:
Start -> Programs ->QTP ->Tools->Test Batch Runner -> Add
63. How do u delete unwanted results in QTP?
A. The navigation to delete unwanted results from QTP is:
Start->Programs->QTP->Tools->Test Results Deletion Tool
A. Three types of data tables are:
A. In Results window.
A. Used by Quick Test to identify the objects with unique description to each of the Object.
A. Smart Identification is a mechanism that helps Quick Test to identify an object, even when the recorded description fails due to changes in one or more property values.
A. The different ordinal identifiers in web pages are:
iii) Creation Time
A. Depending on the usage of Objects we decide which repository to use.
A. Yes, we can run tests without adding objects in your repository using Descriptive programming.
A. The programmatic description will identify the object from the application without the help of Object repository.
A. If we want to run an action for a particular number of times then we go for Loops.
A. Yes and the navigation are:
Insert-> call to win Runner
A. C:\ Program Files\ Mercury Interactive\ Quick Test Professional\ Tests
A. To view the Properties and Methods of Test objects and Run time objects.
A. Go to keyword view->Right click on Action->Action Properties
Check the Re-usable Action Checkbox.
A. Debugging is used to view, set, or modify the current value of objects or variables. It can be done by clicking on debug viewer pane, when test stop at any breakpoint or the test pauses at any step due to error.
A. Open Object Repository-> Add/Remove Object
Record it using Low level Recording.
A. Data Driver is one way of parameterizing the script.
1) QTP is icon based testing tool.
2) QTP uses VB script while winRunner uses TSL which is C language based
3) QTP has Recovery Manager .Win Runner 7.5 also having Recovery Manager.
4) QTP generates output values and these can be used as input values to other Objects
5) QTP has userfriendly Browser, At a glance we can have a look of scripts ,Active Screen and Data XL sheet
6) In QTP we can’t put Runtime Database check Point. In win runner we can
Text Checkpoint: Enables you to check that the text is displayed in a screen, window, or Web page, according to specified criteria. It is supported for all environments
Text Area Checkpoint : Enables you to check that a text string appears within a defined area in a Windows application, according to specified criteria. It is supported for Standard Windows, Visual Basic, and ActiveX environments.