Friday, July 16, 2010

Tutorial 12 - All about parameters in QTP

This tutorial demonstrates parameterization



Video Transcript with Key Takeaways highlighted

* You may be wondering why take the Herculean effort to automate this simple scenario
* Check that user successfully logs in to the application on inputting valid Agent Name & Password
* The need 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
* To achieve this you can either copy the six steps and give different data values which is in fact * something you would do manually. Or you can use Parameterization
* The easiest way to parameterize an argument , in our case Guru is in Keyword view , Click the Parameterization Icon
* Value Configuration Dialog Box Opens. Currently the value is set to a Constant. Click on Parameter Radio Button. QTP assigns a default name to these parameter. You can give a name of your choice. Click Okay
* In the Global Sheet , a column with Header "Agent Name" and value Guru is created. You can enter more values for this parameter
* Likewise you can also parameterize the argument Password and enter different test data sets.
* What this Data sheet means is QTP will iterate the same 6 steps that we have recorded 3 times. During * first iteration it will use the data in the first row. During 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 summary of the 3 iterations.
* A brief recap of parameterization
* Parameterization allows us to pick different values at run time.
* It Reduces Time and Effort.
* Usage of Data Drivers allow us to use the same data for various input boxes. Data Drivers is feature provided by QTP which shows all the constants that could be parameterized in one single window

No comments:

South Beach Smoke E-Cigarette - The Better Smoking Choice