QTP 10 Interview Questions

107.Why do we use breakpoints in QTP?
This is to stop the execution of your test at a certain point while its running.  Typically it is used to observe the state of your application or to understand how a certain feature works at a certain phase at runtime. (The checking is of course a manual step.)
108.What is throw object?
VB Script does not have any specific throw object. (At least to the best of my knowledge) This question will not come up unless a specific add-in that supports this feature is explored.
109.How do you know the location Id of an object if you know its index id?
  • Location is the position of the object from left to right and top to bottom within the parent window, frame, or dialog box relative to other similar objects.
  • Index Id: is the order in which the object appears in your AUT relative to other similar objects.  E.g if you have 2 links, then index id=0 will be first link and index id=1 will be the second link.
  • The answer to this question is entirely dependent on where the object lies, whether it is within the same parent or not.
110.What test cases you can automate using QTP?
As an automation enthusiast I would say, you can automate anything. It is only limited by your imagination and expertise. However, in case you need to understand the look, feel or human reaction to a certain feature, then that is not possible. This is the case with any tool, not specific to QTP.
111.How to handle Java tree in QTP?
You will need to select and load the Java Add-in. Then you can record and work on a Java Tree object just like you would with any other object.
112.How to give call to another action from one action?
Calling one action from the other can be done by “Inserting a call” to an existing action or by creating a new action. Please refer tutorial #21 for detailed explanation.
113.How to find Operating system information using QTP script?
You can do that with the help of environment variable. The exact variable is, OS and OSVersion is for the version information.
114.How you can identify browser and its information using QTP script?
You can identify and act on any browser that you opened again by referring to its ‘creationtime’ property and use it like you would with a browser object in your OR.
115.How are actions and functions different in QTP?
Actions have their own Datatables and OR, but functions don’t. More importantly, Functions are a VB Scripting element, not only applicable to QTP. Please refer article 21 a detailed explanation of these.
116.Explain how to use QTP to check broken links on a page?
Page checkpoint. You can incorporate this page checkpoint on every page to check for broken links. To do so, you can go to Tools->options->Web->Advanced and choosing the option to check for broken links automatically on every page QTP accesses.
117.Can we run multiple QTP scripts one after the other without manual intervention? How?
Yes. To do so, you will have to create a batch file using the batch runner tool.
118.Explain process of smart Identification in QTP
If the recorded description does not enable QTP to identify the specified object in a step, and a smart identification definition is defined (and enabled) for the object, QTP tries to identify the object using “Smart identification”. For more information please refer to the article number: 23
119.When to use shared and local object repository?
The decision is completely up to you. Shared OR will make more sense when you have multiple scripts referring to the same objects.
120.What are the advantages of Object Repository?
OR is an inbuilt feature provided by QTP to store your test objects. There are many advantages and the most important one is that it is a mandatory element unless you are going for descriptive programming..
121.In Hybrid framework, data can accessed through database, excel file, XML etc. Is it true?
Yes. Any of the mentioned data sources are permissible.
123.How to associate function library at run time?
1. You can do so by using the “LoadFunctionLibrary” method. LoadFunctionLibrary “Completepath”
2. You can also use the ExecuteFile method. ExecuteFile “Completepath”
124.Hybrid framework can be implemented for any application. Is it true?
Yes
125.Hybrid framework supports Descriptive programming. Is it true?
Yes. Frameworks are mostly based on how and where you want your test assets to be placed and how they are to be accessed for maximum efficiency. They do not restrict how you write you test itself.
126.What are the advantages of Hybrid framework?
Hybrid framework is nothing but a combination of frameworks that make you arrive at a solution for your testing needs by taking what works best for your scenario. The obvious advantage is the versatility. It can be tailored to meet any testing project’s need.
127.What is Procedure or Subroutine in VB Script?
  • Subprocedure is a series of VB Script statements (enclosed   by Suband End Sub statements) that perform actions but don’t return a value.
  • ASub procedure can take arguments (constants, variables, or expressions that are passed by a calling procedure).
  • If aSubprocedure has no arguments, its Sub statement must include an empty set of parentheses ().
128.Is VB Script Case sensitive or Case insensitive?
It is not case sensitive with respect to command and variable names. Everything else, like strings (text) is.
129.How to record application running on Virtual machine?
You can access and record QTP script as long as the application is available to you via a browser and not by using remote connecting software.
130.What are the factors on which script execution time is dependent?
1. Network and computer speeds. The response time from the app, the database etc. This is true even if you are manually executing the test.
2. It also depends on the wait statements you have included.
3. Not loading the add-ins that your test does not use helps too.
4. Descriptive programming steps take longer than regular ones to execute
5. Capturing screenshots at run time through QTP also consumes time
6. Disabling smart identification also speeds up the QTP script running time
131.What is Test Fusion Report in QTP?
Test Fusion report as the name indicates is a detailed test results that QTP provides in a tree format. It has all the iteration information, data used for each of them along with the standard information.
132.Both Static and dynamic arrays are handled by VB script. Is it true?
Yes. A static array is declared as Dim A(10). This means it’s an array of 11 items. If the tester needs to modify it to contain 20 items he can do so by using ‘redim’.
redim A(19). There is a “Preserve” statement that can be used in conjunction with the redim statement. When preserve is used all the previous values are not erased.
133.What is the difference between keyword view and expert view?
They are two ways QTP shows your test. Each one has their own features and caters to users of different levels of expertise.
Keyword view: This is a tabular representation of your test that has the information like the Item, Operation,Data and Comments.
Expert view: This displays your test in terms of the actual lines of code. It is more like a VB Script editor and is used by advanced users.
134.In website, protocol has been changed http: to https what you will do? Tell me your approach?
Since the protocol change does not necessarily affect the UI change, except may be for a warning message about certificates, there are not many changes. All you need to do is provide the new URL and make sure you handle the security related pop-ups.
FabGreen Technologies,Madivala-
Fabgreentech.com

No comments:

Post a Comment