Wednesday, July 2, 2008

QTP II

1. What is the file extension of the code file & object repository file in QTP?
Ans) for object repositories file the extension is .tsr
for code file the extension is .vbs
2. Explain the concept of object repository & how QTP recognises objects?
Ans) 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.
3. What are the properties you would use for identifying a browser & page when using descriptive programming?
Ans) Title is the property we use.ex: Browser("Title:="xxx").page("Title:="xxxx").....
"Name" would be another property apart from "title" that we can use.
Ex: Browser ("name:="xxx"").page("name:="xxxx"").....
4. What are the different scripting languages you could use when working with QTP?
Ans) Visual Basic Script,XML,JavaScript,Java,HTML
5. Give me an example where you have used a COM interface in your QTP project?
6. Few basic questions on commonly used Excel VBA functions.
7 Explain the keyword createobject with an example.
Ans) Creates and returns a reference to an Automation object . 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).
8. Explain in brief about the QTP Automation Object Model.
Ans) Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest 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 QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your program

9. What are the Features & Benefits of Quick Test Pro(QTP)..?
Ans) Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center.
Introduces next-generation “zero-configuration” Keyword Driven testing technology in QuickTest Professional 8.0 — allowing for fast test creation, easier maintenance, and more powerful data-driving capability
Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution
Collapses test documentation and test creation to a single step with Auto-documentation technology
Enables thorough validation of applications through a full complement of checkpoints

10) How to handle the exceptions using recovery secnario manager in QTP?
Ans) You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps
1. Triggered Events
2. Recovery steps
3. Post Recovery Test-Run

11) what is the use of Text output value in QTP?
Ans) Output values enable to view the values that the application takes during run time. When parameterized, the values change for each iteration.Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.

12) How to use the Object spy in QTP 8.0 version?
Ans) There are two ways to Spy the objects in QTP
1) Thru file toolbar
---In the File Tool Bar click on the last toolbar button (an icon showing a person with hat).

2) Through 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.
The 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

13) QTP pros and cons
Ans) Pros:
 Will be getting the initial focus on development of all new features and supported technologies.
 Ease of use.
 Simple interface.
 Presents the test case as a business workflow to the tester (simpler to understand).
 Numerous features.
 Uses a real programming language (Microsoft’s VBScript) with numerous resources available.
 QuickTest Pro is significantly easier for a non-technical person to adapt to and create working test cases, compared to WinRunner.
 Data table integration better and easier to use than WinRunner.
 Test Run Iterations/Data driving a test is easier and better implement with QuickTest.
 Parameterization easier than WinRunner.
 Can enhance existing QuickTest scripts without the “Application Under Test” being available; by using the ActiveScreen.
 Can create and implement the Microsoft Object Model (Outlook objects, ADO objects, FileSystem objects, supports DOM, WSH, etc.).
 Better object identification mechanism.
 Numerous existing functions available for implementation – both from within QuickTest Pro and VBScript.
 QTP supports .NET development environment (currently WinRunner 7.5 does not).
 XML support (currently WinRunner 7.5 does not).
 The Test Report is more robust in QuickTest compared to WinRunner.
 Integrates with TestDirector and WinRunner (can kick off WinRunner scripts from QuickTest).
Cons:
 Currently there are fewer resources (consultants and expertise) available due to QTP being a newer product on the market and because there is a greater Demand than Supply, thus fewer employee/consulting resources.
 Must know VBScript in order to program at all.
 Must be able to program in VBScript in order to implement the real advance testing tasks and to handle very dynamic situations.
 Need training to implement properly.
 The Object Repository (OR) and “testing environment” (paths, folders, function libraries, OR) can be difficult to understand and implement initially.

14) what is the difference between test plan and test strategy?
Ans) This is answer to Test strategy. The testing strategy should define the objectives of all test stages and the techniques that apply. The testing strategy also forms the basis for the creation of a standardized documentation set, and facilitates communication of the test process and its implications outside of the test discipline. Any test support tools introduced should be aligned with, and in support of, the test strategy. Whereas the test plan is the requirements definition and design specifications facilitate in the identification of major test items and these may necessitate the test strategy to be updated. A detailed test plan and schedule is prepared with key test responsibilities being indicated

15) Can test automation improve test effectiveness?
Ans) Yes, Automating a test makes the test process:
1.Fast
2.Reliable
3. Repeatable
4.Programmable
5.Reusable
6.Comprehensive

16) How will you choose a tool for test automation?
Ans) choosing of a tool depends on many things ...

1. Application to be tested
2. Test environment
3. Scope and limitation of the tool.
4. Feature of the tool.
5. Cost of the tool.
6. Whether the tool is compatible with your application which means tool should be able to interact with your application
7. Ease of use

17)

No comments:

Search