http://quicktesthp.blogspot.com

QTP VBScript new series + Interview Question Bank on QTP for enrichment of Knowledge in QTP

This Site has been brought to you by HP Certified Expert of QTP.

Exciting new articles for October:

1) QTP Tip:Deselect all Radio Buttons

2) HP QTP Crypt Object

3)Adding Hyperlinks in Excel Spreadsheet

Best of Luck Friends ! ! !

Expert QTP
expert.qtp@gmail.com

All Articles are Copyright Protected. These are Free for Reading & Personal Use. Reproduction in Any Form without the Permission is Illegal & Strictly Prohibited.

Copyright © 2009 ExpertQTP

Google Search

Saturday, September 27, 2008

QTP - Interview Question Bank : Part 3

Q. 21: Where can we use a Function or an Action? ========================================
It all depends on the scenario.

If you want to use the OR feature then you have to go for Action only. If the functionality is not about any automation script i.e. a function like getting a string between to specific characters, now this is something not specific to QTP and can be done on pure VB Script, so this should be done in a function and not an action. Code specific to QTP can also be put into an function using DP. Decision of using function/action depends on what any one would be comfortable using in a given situation.

===================================================
Q. 22: What is the difference between an Action and a Function? ===================================================
Action is a activity specific to QTP while functions are a generic thing which is a feature of VB Scripting. Action can have a object repository associated with it while a function can't. A function is just lines of code with some / none parameters and a single return value while an action can have more than one output parameters.

================================================
Q. 23: What are the various events available in the Recovery Scenario Manager? ================================================
1) Application Crash:
This event is useful in handling crashed applications at runtime.

2) Pop Up Window:
This event is useful in managing various unwanted application windows, which get built-up at runtime.

3) Test Run Error:
This event is useful in handling VBScript statement errors at runtime.

4) Object State:
This event is useful in handling object related errors at runtime.

=========================================
Q. 24: What are the Elements of Recovery Scenario?=========================================
Steps to handle the exceptions are
1) Trigger Event: Is an unexpected event like appearance of a Pop-up window, object state, test run error causing application crash or interruption in our running session.

2) Recovery Steps: Constitutes a series of steps required to be performed to enable QTP to proceed further with the process of test after some trigger event has interrupted the run session. Examples of a recovery operation can be 1) A keyboard or mouse Operation like a Click over the "OK" button in the Pop-up window 2) Close Application Process 3) Function Call 4) Restarting the OS etc.

3) Post-Recovery Test Run:
Are a set of instructions designed to be provided to QTP on proceeding further with the test after some recovery operation has been carried out. Examples of Post Recovery actions can be repeating the complete test from the beginning or some steps may be skipped altogether & continuing with the remaining steps in the test.

=====================================================
Q. 25: When to use a Recovery Scenario and When to use "on error resume next"?=====================================================
Recovery scenarios are useful when it is difficult to predict at which step the errors can come or when we are confident that the error will not come in the QTP script, whereas it can be anywhere outside the QTP Script. For illustration; Pop-up message of "out of paper", as caused by the printer device driver. "On error resume next" is preferred when we sure that the error is expected one and wish to perform some other actions.

=========================================
Q. 26: What are the key features of QTP at a glance:
=========================================
# Ease of use:
QTP allows even novice testers to become productive in minutes. You can create a test script by simply pressing a Record button and using an application to perform a typical business process. Each step in the business process is automated documented with a plain-English sentence and screen shot. Users can easily modify, remove, or rearrange test steps in the Keyword View.

# Simple interface: QTP is much simpler to understand. It presents a test case as a simple business workflow to the tester.

# Simple Language: QTP uses Microsoft's VBScript for its test procedures, and to manipulate the objects and controls of the application under test. VBScript is a real programming language where several existing functions & resources are easily available for implementation these days.

# Use of zero-configuration Technology: QTP uses next-generation "zero-configuration" Keyword Driven testing technology. This helps in faster test creation, easier maintenance, and provides more powerful data-driving capability.

# Automatic insertion of checkpoints: QTP enables thorough validation of applications through a full complement of checkpoints. QTP can automatically introduce checkpoints to verify application properties and functionality, for example to validate output or check link validity.

# Marvelous interface with Data-tables: QTP allows entry of test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files. QTP has better and easier to use Data table integration compared to WinRunner.

# Better object identification mechanism: QTP Identifies objects with Unique Smart Object Recognition, even if objects change from build to build, thereby enabling reliable unattended script execution.

# Support of variety of environment: QTP supports functional testing of all popular environments, like Windows, Web, .Net, Visual Basic, ActiveX, Java, SAP, Siebel, Oracle, PeopleSoft, terminal emulators, and Web services.

# Easy adaptability of Microsoft Object Models: QTP can easily create and implement Microsoft Object Model like: Outlook objects, ADO objects, FileSystem objects, supports DOM, WSH, etc.

# Auto-documentation technology: QTP renders test documentation and test creation to a single step with the help of its auto-documentation technology

=================================================
Q. 27: What are various types of properties when using object identification in QTP?
=================================================
QTP uses three types of properties when identifying a object
1. Mandatory Properties - Always learn these properties for the object

2. Assistive Properties
- Learn in case Mandatory properties are not enough to identify the object uniquely

3. Ordinal identifiers
- Learn in case both mandatory and assistive properties are not able to recognize the objects correctly

=====================================================
Q. 28: What are the various ways to insert a Action in a test in QTP?=====================================================
There are three ways to insert a Action in a test
1. Insert Call to New…
2. Insert Call to Copy…
3. Insert Call to Existing…

========================================
Q. 29: What is the use of Parameterization in QTP?========================================
Parameterization is helpful in following aspects.# Parameterization allows us to pick different values at run time.
# Reduces Time and Effort.

# Usage of data drivers allows us to use the same data for various input boxes.

# Parameterization can also be done for checkpoints.

=============================
Q. 30: What are Data Tables in QTP?
=============================
Data Table is MS Excel like spreadsheet which can be used for parameterizing a test case
DataTable are of two types:
1. Global Data Table - Data table for Test flow

2. Local data table - Data table for every action


Keyword: QTP Interview Questions, FAQ QTP

No comments:

 
Copyright © 2009 ExpertQTP