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

No comments:

Post a Comment