Pages

Men

rh

7/16/2012

Basic Interview Point of Questions on QTP Part- 2


What are the Run modes in QTP ?
There are 2 run modes in QTP
 
Normal
It shows the execution of your QTP script step by step. This works good in case of debugging 
your script.

Fast Run
It will not show the execution line by line.

What are the Debugging modes used in QTP ?
Different Debugging modes used in QTP are

Step Into
To run only the current line of the active test or component.
 
Step Out 
Runs to the end of the called action or user-defined function, then returns to the  calling action 
and pauses the run session.

Step Over
To run only the current step in the active test or component. When the current step calls    
another  action or a user-defined function,the called action or function is executed entirety, but 
the called action script is not displayed in the QuickTest window.

What are the draw backs of QTP ?
Disadvantages are  

QTP takes very long to open huge tests. Also CPU utilization becomes 100% in that case. 
QTP scripts are heavy as it stores all the html files (for active screen) as well. 
Block commenting is not provided till 8.2 version.

What are the extension of file..........
  •   Per test object repository : filename.mtr (Mercury Test Repository)  
  •   Shared Oject repository : filename.tsr (Test Shared Repository)
  •   User Defined Libary File : filename .vbs
  •   Test Batch Runner File : filename .mtb
  •   QTP Recovery Scenarion File : filename .qrs
What are two types of automation in QTP ?
There are 2 types of automation
  •   Recording or generating the script and playing back using Repository
  •   Another one is Descriptive method.
Can we do more than capture / payback in QTP ?
Yes we can do. That is scripting we can write script which is more effective

What is Descriptive programming ?
With out mentioning the description in Object repository, we can directly mention the description in Test script is known as descriptive programming

What is Object repository ?
Object repository in qtp is like a storage place where it stores the properties of all the objects when we reocrd the script and later when we execute the script QTP checks that the objects in the application match the objects in the object repository and executes it, if both the objects matches the test will pass, if it cannot identify the object or there is a mismatch the script will fail.
Object repository is same as GUI map in winrunner where we have to make the tool capture the properties of object where as in QTP object repository automatically does that for us.

What are types of Object repository (OR)?
OR are of two types
  •   Per-action
  •   Shared
Tell about Per-action repository modes
In this, for each action a seperate object repository file is created. So object1 in Action1 is different from the same object1 in Action2
 
This mode is most useful, when the object does not change frequently and a few actions are associated with the test. If the object changes in the application, then we need to change each of the object repositor.

Tell about Shared object repository modes
In this, common object repository file can be used for muliple actions and multile tests. So Object1 is action1 is same for Action2, because all the objects are saved at one place. Here if the object changes, then we need to update a single object repository file.

What are the Advantage & Disadvantge Per-action repository ?
Advantage 

As you record operations on objects in your application, QuickTest automatically stores the information about those objects in the appropriate action object repository. 

When you save your test, all of the action object repositories are automatically saved with the test as part of each action within the test. The action object repository is not accessible as a separate file (as is the shared object repository).

Disadvantages  

Modifying the test object properties, values, or names in one object repository does not affect the information stored for the same test object in another object repository or in other tests - Time Consuming.

If you add objects to one of the split actions, the new objects are added only to the corresponding action object repository.

What are the Advantage & Disadvantge Shared object repository ?
Advantage   

Only one instance of the object in the repository so reduce the repetitions 
One time change to the object properties would bring change in every script using the object

Disadvantge
  •   Complexity increase as objects of all the action are in the same repository
What is Check points ?
A checkpoint verifies that expected information is displayed in an Application while the test is running. Checkpoints are used to compare actual and expected results.

How many Check points are there in QTP ?
They are 4 types of checkpoints
  •   GUI Check point
  •   Bitmap Checkpoint
  •   Database Checkpoint
  •   Test Checkpoint
What is the use of Check points ?
The Check points is useful to get the point in time from where to begin the recovery in case of failure.

Can we change the name of the Check points ?
No, QTP is do not allow to change the name of Check point, because these class names are internally built. But in version 9 (just released) it is possible to cahange not in previous versions

What is Transaction ?
A Transaction is a logical unit of work that comprises one or more SQL statements executed by a single user. or It is a group of statements between two commits

What is use of Step Generator ?
Step Generator is used to insert a statement(function ro method) of a particular object which is available in the Object Repository

What is Source Control ?
The practice of tracking changes made to code is called Source Control. Familiar Source control Tools are CVS, VSS, ClearCase etc

What is Batch testing ?
Group of tests executing sequentially one by one is called Batch Testing. Every test Batch consists of mutiple dependent test cases. In those batches every end state is base state to next case. Test batch is also known as Test suit or Test belt.

Generally Test engineers are executing test programs as a batches because "End state of one test is base state to another test".  The result of one Script failure or pass , fails or passes the whole batch test.

What will you when Object is not indentifed by the Obect Repository ?
Use Smart identifcation.

What is Smart identifcation ?
Smart Identification is used by QTP, whenever it is unable to identify any object during run time. While identifying an object, QTP tries to match the mandatory properties first, if it couldn't find the object, then it adds assistive properties one by one to identify the object correctly. This operation is done by smart identifier and it is displayed in the results section along with one warning message. It's generally used to identify Web elements only.

What is Envoirement variable ?
Envoirement variable is variable which is global through the testing.

What is the typesof Envoirement variable ?
There are 3 types of environmental variables
  •   User-Defined Internal
  •   User-Defined External
  •   Built-In
What are Exception in QTP ?
The four exceptions are
  •   Pop exception
  •   Object state
  •   Test run error
  •   Application crash
Can We use Test Director with QTP ?
Yes. We cant use Test Director 7.2 with QTP 8.2. Because QTP 8.2 supports QC (Quality Center) 
 
We can use QTP 8.2 with Test director 8.0.

What are Action ?
There are 3 types of Actions available in QTP.   
  •   Non-reusable 
  •   Reusable 
  •   External Actions
What is Framework ?
A framework is nothing but a folder structure . It contains all the components that are using in Automation Architecture. Here components means Object Repository, Library,Logs, Test Data, Script, Result etc

What is Compiled modules ?
In qtp the compiled modules are called library files .

What is Automation Framework ?
Automation frame work is nothing but a set of rules defined for developping and organising the test scripts or It is a process to develop the automation scripts and reduce maintenance. This framework completely depends on the application, types of testing and tools that you are using. Its hard to provide generalised framework for all applications:

In how many ways we can Parameterize our test ?
we can parameterize our tests in 4 ways.
  •  Test or component parameter
  •  Data Table parameter
  •  Environmental variable parameter
  •  Random number parameter
What are tyes of Table ?
Types of tables are
  •   Run time data table
  •   Design time data table

No comments :

Post a Comment