• Home
  • Testing
  • SAP
  • Web
  • Must Learn!
  • Big Data
  • Live Projects
  • Blog

This tutorial demonstrates how to do parameterization to login successfully to flight reservation application. You may be wondering why take the Herculean effort to automate this simple scenario. We will check that user successfully logs in to the application on inputting valid Agent Name & Password. The need for parameterization becomes obvious if we extend the scope of the scenario to include a Combination of valid ALPHANUMERIC Agent Name & Password. In this case, the Test Steps Will Remain the Same. But we will have more combinations of Data to TEST. We will restrict to just 3 of possible 8 combinations.
Learn parameterization in QTP

To achieve this, you can either copy the six steps or give different data values that are in fact something you would do manually, or you can use Parametrization.
Learn parameterization in QTP

The easiest way to parameterize an argument, in our case Guru is

  1. Click Keyword View
  2. Click the Parametrization Icon.

Learn parameterization in QTP

Value Configuration Dialog Box Opens. Currently, the value is set to a Constant. Click on Parameter Radio Button. QTP assigns a default name to this parameter. You can give a name of your choice and then click "OK."
Learn parameterization in QTP

In the Global Sheet, a column with Header "Agent Name" and value Guru is created. You can enter more values for this parameter.
Learn parameterization in QTP

When you click on "expert view" you will see that "Agent Name" is replaced by "Guru", and the type of sheet used.

Learn parameterization in QTP

Likewise, you can also parameterize the argument Password and enter different test data sets.
Learn parameterization in QTP

What this Data sheet means is QTP will iterate the same six steps that we have recorded three times. During the first iteration, it will use the data in the first row. During the second it will use data in the second row and so on. Now lets run the script. This is the first iteration. This is the second iteration.In the status bar QTP gives information of the row, it is currently using as test data and highlights the corresponding row in the data sheet. The results will show a summary of the 3 iterations.
Learn parameterization in QTP

Advantages of parameterization

  • Parameterization allows us to pick different values at run time
  • It Reduces Time and Effort
  • Usage of Data Drivers allows us to use the same data for various input boxes. (Data Drivers is feature provided by QTP that shows all the constants that could be parameterized in one single window). It makes parameterization of big script easy.

Please be patient. The Video will load in some time. If you still face issue viewing video click here