Friday, August 3, 2012

Parameterization


*******************************************************************************
Parameter:

******************************************************************************* 
parameter is a special kind of variable, used in a function to refer to one of the pieces of data provided as input to the function.

 *******************************************************************************
Parameterization:

 *******************************************************************************
Parameterization is the process of replacing variable with a value.
 *******************************************************************************
Advantages of Parameterization:
*******************************************************************************
  • Parameterization allows us to pick different value at run time.
  • Reduces time and effort
  • it greatly increases the power and flexibility of our test
  • parameterization allows to perform data driven testing
 *******************************************************************************
 Without Parameterization:
*******************************************************************************
WinEdit(“Login”).Set “hi”
WinEdit(“Login”).Set “hello”
WinEdit(“Login”).Set “QTP”
 *******************************************************************************
 With Parameterization:

 *******************************************************************************
WinEdit(“Login”).Set DataTable(”Name”, dtglobalsheet)

*******************************************************************************
We Can do Parameterization in three ways:
*******************************************************************************
  • Using Data Table
  • Using Environment variables
  • Using Random number

Recording Modes

There are three types of recordings in QTP:


1) Normal Recording:

2) Analog Recording:

3). Low-Level Recording:

******************************************************************************
 Normal Recording:
******************************************************************************
           This is the default mode in QTP. It recognizes the objects in the application regardless of their location on screen.
For recording just click on Record button in QTP and start recording.

******************************************************************************
Analog Recording:
******************************************************************************
           In this recording QTP records and tracks every movement of the mouse as you drag the mouse around a screen or window.

******************************************************************************
Low-Level Recording:
******************************************************************************
            In this recording, QTP records the object in terms of its X and Y coordinators on the screen.

******************************************************************************