Академический Документы
Профессиональный Документы
Культура Документы
1) What are the differences between Actions and Functions and which are better?
Actions:
o It’s a QTP feature and Local feature (not a global feature)
o We can use check points in Actions
o As it is QTP feature it may corrupt
o Actions are slow execution
Functions:
o It’s a VB script feature and global concept
o We can’t use checkpoints in functions, instead of checkpoints we can use validation points
(Loops and Conditional statements)
o It doesn’t corrupt
o Functions are faster in execution than Actions
With the help of WSH (It is a Windows administration tool), we can use Windows API functions for
enhancing Tests.
4) What are the major differences between functions and actions in QTP? What
advantages there in functions than actions?
It’s a process of Automating the Quick test operations. To do this we can use java script, VC++
and .NET Apart from VBscript.
WSH is a windows administration tool, it provides hosting environment for running VBscript,
Jscript scripts.
We use constants for replacing literal values and constants never change.
We use variables for storing values that returned by the program, functions, etc.
Variable values may vary through out the script.
o If application is not ready (using screenshots and documents we can prepare descriptive
programming)
o If we want to make our scripts global
o If lengthy tests are there and that we want to execute fast
11) How to build scripts that access data from external resources?
We can fetch test data directly from external files and databases by creating automation objects
Ex:ADODB, Filesystemobject
It is a feature of QTP, used for getting the object’s information (all properties and values) .It is
available in QTP tool main window, in Local repository and in object Repository Manager
14) What is an Action? How many types of Actions are there in QTP?
Whenever QTP is not recognizing an area or user defined object as an object that we can make
as a virtual object.
For making virtual objects QTP is providing a feature called Virtual object manager. Through this
we can configure virtual objects.
The object, which properties change dynamically (frequently). We can use Regular Expressions
to handle dynamic objects.
The purpose of description object is to store multiple properties values of a test object.
18) What is the advantage of associating a procedure to a test object?
By associating a procedure to a test object we can use this as a method on that test object.
o Action is a QTP tool feature that occupies QTP’s more memory space.
o It may be corrupted.
o It is not a global feature. Test engineer may not have the control on action.
21) What is the difference between Test Objects and Run Time Objects ?
Test objects are basic and generic objects that QTP recognize. Run time object means the actual
object to which a test object maps.
Yes. You can use SetTOProperty to change the test object properties. It is recommended that
you switch off the Smart Identification for the
Below are some of the situations when Descriptive Programming can be considered useful:
The objects in the application are dynamic in nature and need special handling to identify the
object. The best example would be of clicking a link which changes according to the user of the
application, Ex. “Logout <<UserName>>”.
When object repository is getting huge due to the no. of objects being added. If the size of Object
repository increases too much then it decreases the performance of QTP while recognizing a
object.
When you don’t want to use object repository at all. Well the first question would be why not
Object repository? Consider the following scenario which would help understand why not Object
repository
Scenario 1: Suppose we have a web application that has not been developed yet. Now QTP for
recording the script and adding the objects to repository needs the application to be up, that
would mean waiting for the application to be deployed before we can start of with making QTP
scripts. But if we know the descriptions of the objects that will be created then we can still start off
with the script writing for testing
Scenario 2: Suppose an application has 3 navigation buttons on each and every page. Let the
buttons be “Cancel”, “Back” and “Next”. Now recording action on these buttons would add 3
objects per page in the repository. For a 10 page flow this would mean 30 objects which could
have been represented just by using 3 objects. So instead of adding these 30 objects to the
repository we can just write 3 descriptions for the object and use it on any page.
Modification to a test case is needed but the Object repository for the same is Read only or in
shared mode i.e. changes may affect other scripts as well.
When you want to take action on similar type of object i.e. suppose we have 20 textboxes on the
page and there names are in the form txt_1, txt_2, txt_3 and so on. Now adding all 20 the Object
repository would not be a good programming approach.