QTP Interview Questions and Answers
Question - 21 : - How many ways we can parameterize data in QTP?
Answer - 21 : - There are four types of parameters: Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test. 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 uses a different value from the Data Table. Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that Quick Test generates for you based on conditions and options you choose. Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have Quick Test generate a random number and insert it in a number of tickets edit field.
Question - 22 : - How do u do batch testing in WR & is it possible to do in QTP, if so explain?
Answer - 22 : - Batch Testing in WR is nothing but running the whole test set by selecting Run Test set from the Execution Grid. The same is possible with QTP also. If our test cases are automated then by selecting Run Test set all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in Waiting mode.
Question - 23 : - If I give some thousand tests to execute in 2 days what do u do?
Answer - 23 : - Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine.
Question - 24 : - What does it mean when a check point is in red color? what do u do?
Answer - 24 : - A red color indicates failure. Here we analyze the cause for failure whether it is a Script Issue or Environment Issue or a Application issue.
Question - 25 : - What is the file extension of the code file & object repository file in QTP?
Answer - 25 : - Code file extension is.vbs and object repository is.tsr
Question - 26 : - Explain the concept of object repository & how QTP recognizes objects?
Answer - 26 : - 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 Ordinal identifier such as objects location on the page or in the source code.
Question - 27 : - What are the properties you would use for identifying a browser & page when using descriptive programming?
Answer - 27 : - Name would be another property apart from title that we can use.
Question - 28 : - Give me an example where you have used a COM interface in your QTP project?
Answer - 28 : - com interface appears in the scenario of front end and back end. for eg:if you r using oracle as back end and front end as VB or any language then for better compatibility we will go for an interface. of which COM will be one among those interfaces. Create object creates handle to the instance of the specified object so that we program can use the methods on the specified object. It is used for implementing Automation(as defined by Microsoft).
Question - 29 : - Explain in brief about the QTP Automation Object Model.
Answer - 29 : - Essentially all configuration and run functionality provided via the Quick Test interface is in some way represented in the Quick Test automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in Quick Test have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the Quick Test automation object model, along with standard programming elements such as loops and conditional statements to design your program.
Question - 30 : - What are the types object Repositories in Micro Focus UFT.
Answer - 30 : -
QTP Supports 2 types of Object Repository
1) Shared Object Repository (also called Global)
2) Per-Action Object Repository, (also called Local)
Per-Action Object Repository is used by default. The extension for Per-Action repository is “.mtr” .
Shared Object Repository is preferable while dealing with dynamic objects which are called in multiple tests. The extension is “.tsr”