QTP Interview Questions & Answers

Posted On:January 28, 2019, Posted By: Latest Interview Questions, Views: 1123, Rating :

Best QTP Interview Questions and Answers

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.

1. What is the default Add-ins in QTP?        

A. ActiveX, Visual Basic, Web, Multimedia

interview questions on QTP

2. Is QTP Supports UNI-CODE?

A. Yes. UNI-CODE is a 16-bit machine understandable language.

 

3. How you are developing the script? Using record and play back or manual?

A.   Both. Developing the Script depends on the Test Scenario.

 

4. How many types of recording modes are there?

A.   Three modes. They are Normal, Analog, and Low-level

      

5. What is the difference between Analog and Low level recording?

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.

 

6. Where we can use the Analog Mode and where we can use the Low – level Mode?

A. Analog Mode is used for Signatures.

Low – level Mode is used when your Quick test is not recognizing certain objects in your Application.

 

7. Is it possible to change the values of Analog Recording?

A. No

 

8. How many types of Run modes are there in QTP?

A. Test Run Mode, Update Run Mode and Debug Run Mode

 

9. What are Test Settings and Global Settings?

A. Test Settings are settings of that particular test only.

Global Settings are settings that reflect any test in QTP.

 

10. How many types of Objects are there in QTP?

A. Two types. Test Objects and Run Time Objects.

 

11. What is test object?

A. test object are basic and generic objects that  QTP recognize

 

12. What is Run Time Object?

A. Runtime object means the actual object to which a test object maps

 

13. Difference between Test Object and Run Time Object?

A. Test object are basic and generic objects that  QTP recognize Runtime object means the actual object to which a test object maps

 

14. What is Action? How many types of Actions are there in QTP?

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

 

15. Difference between Copy to Action and Call to 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.

 

16. What is an Object Repository?

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.

 

17. What are the types of Object Repositories? Which one is u using?

A. Two types of Object Repositories are

Per-Action (default)

Shared

We are using Shared Object Repository.

18. Have you faced any problems with 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.

 

19. Is it possible to merge two Object Repository files in QTP?

A.  No, u can’t merge Object repository files with each other.

 

20. What is the difference between Per-Action and Shared?

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.

 

21. How QTP recognizes the Object?

A. QTP recognizes Objects through Object Repository.

 

22. If I change the object name in one action will it be updated in all the actions? Or not?

A. No, changes made to objects in one Action will not be reflected in any other Action.

 

23. How to get the particular property value?

A. Either using Object Spy or using GetTOProperty (Property Name).

 

 

24. Is it possible to change the property value at runtime? How it is possible?

A.   Yes, using SetTOProperty (property name, Value)

 

25. If I change the property value at runtime is it effect is Object Repository? 

A.   No.

 

26. What is the parameterization? Give one example?

A. Parameterization means executing the same operation many times with different Input data.

 

27. How many ways is to parameterize the value?

A. Four ways. They are:

i) Test/Action 

ii) Data Driver

iii) Environment variable

iv) Random Number

 

28. What is a checkpoint? How many check points are there in QTP?

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

 

29. What is the diff between image and bitmap check point?

A.   Image: Used to check the property of an image.

       Bitmap: Used to check the selected/full image comparison.

 

30.  Have u used XML check point in your project? How?

A.   No

 

31.  For example u r checking bit map check point before coming to the results. How can u say it is passed? Or failed? Anyways?  

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.

 

32. What is text check point and text area check point?

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.

 

33. Suppose I want fail that check point? How can u do that?

A. After recording particular object, just change the value and play it back. The

Checkpoint will be failed.

 

34. Is text area check point supports for web applications?

A.    No

 

35. In QTP is it possible to check broken links of a page?

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

 

36. Do u know how to connect Database? Can u tell me the procedures?

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

 

37. What is output value? How many types of output values are there in QTP? 

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.

 

38. What is accessibility check point?

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.

 

39. How to check bitmap output value?

A.    There is no output value for Bitmap.

 

40. I have created 3 actions in test action1, action2, action3 but I want run action 1,action 3,action2 how can u change in the actions in keyword view?

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.

 

41. Suppose I created one object as virtual object? That object is applicable to that test? Or all the tests?

A. No, the virtual Object you created will be applicable only to that test.

 

42. Is virtual object supported in low level recording mode?

A.  Virtual Object will be supported only in Normal Recording. Both Analog and Low Level Recording will not support Virtual Objects.

       

43. If created one virtual object? Next time I changed the window position will it work?

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.

 

44. How u create new action in QTP?

A.   Open QTP startup window, click on “Insert” in the menu bar, select “Call to new Action”. It will create a new Action.

 

45. Is it possible to split an action?  How?

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.

 

46. How u calling actions in QTP?

A.   U can call actions in QTP in 2 ways.

They are:

i) Call to Copy of an action

ii) Call to External action

 

47. I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?

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

Example:

RunAction “action 1”, oneIteration

RunAction “action 2”, 1, “1-4”

 

48. Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

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.

 

49. How can u pass value one action to another action?

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

 

50. How can u exit from an action?

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.

 

51. What is recovery scenario Manager? When you go for recovery scenario Manager? Tell me on scenario were your used recovery scenario in your project?

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.

 

52. What are the trigger events in QTP?

A.   Trigger Events are events that interrupt you in your run session.

 

53. How many types of trigger events are there in QTP?

A.   The different types of Trigger Events in QTP are:

i) Pop-Up window

ii) Object State

iii) Test Run Error

iv) Application Crash

 

54. How can you send user defined messages to test report?

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.

 

55. How can get count of list box?

A.   By using getItemscount method

 

56. How many types of status are there?

A.  There are 4 types of Status in QTP. They are 

i) Passed

ii) Failed

iii) Warning

iv) Done

 

57. What is synchronization? What are the ways u can synchronize?

A.  It is used to eliminate the anticipated timing problems between the Quick test Script and the Application. Different ways of synchronizations are:

i) Wait

ii) Sync

iii) Exist

iv) WaitProperty

v) Synchronization timeout

 

58. Where we can use the synchronization?

A.  i) When waiting for the message box to be opened

     ii) When waiting for the Web Page to be down loaded

 

59. How can u give wait up to 10 seconds in QTP?

A.  Wait (10)

 

60. How can I change object description or check point values in QTP?

A.  Using Object Repository.

 

61. What is optional step?

A.   Your Script will be skipped to the next step if any error occurs in the step. That step is called Optional step.

 

62. Have u done batch testing in QTP? If yes how u r doing?

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

 

64. *How does u pass optional arguments in QTP?

A.

 

65. What are the types of data tables in QTP?

A. Three types of data tables are:

i) Global 

ii) Action

iii) Run-Time

 

66. Where u get the run time data table?

A.  In Results window.

 

67. What is object identification?

A.  Used by Quick Test to identify the objects with unique description to each of the Object.

 

68. What is smart identification?

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.

 

69 What are the ordinal identifiers in web page?

A.  The different ordinal identifiers in web pages are:

i) Index

ii) Location

iii) Creation Time

 

70. How u can decide which type of object repository u have to use?

A.  Depending on the usage of Objects we decide which repository to use.

 

71. Can we run test with out adding object in object repository? How it is possible?

A.  Yes, we can run tests without adding objects in your repository using Descriptive programming.

 

72. What is a programmatic description?

A.   The programmatic description will identify the object from the application without the help of Object repository.

 

73. When do go for loop condition in test?

A.   If we want to run an action for a particular number of times then we go for Loops.

 

74. Is it possible to call win runner script in QTP?

A.  Yes and the navigation are:

Insert-> call to win Runner

 

75. Where you are storing your script?

A.   C:\ Program Files\ Mercury Interactive\ Quick Test Professional\ Tests

 

76. What is use of object spy?

A.   To view the Properties and Methods of Test objects and Run time objects.

 

77. How you can make an action as re-usable action?

A.  Go to keyword view->Right click on Action->Action Properties

Check the Re-usable Action Checkbox.

 

78. What is debugging? How you debug your script?

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.

 

79. If object is not recognized by QTP but the object is standard object what is your approach?

A. Open Object Repository-> Add/Remove Object

                           Or

Record it using Low level Recording.

 

80. What is Data driver in QTP? Where we use it?

A.  Data Driver is one way of parameterizing the script.

 

81. What are the main Differences of QTP and Win Runner?

        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

 

82. Differences between Text and Test Area Checkpoints?

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.