Sunday, 24 January 2016

QTP - 39 - Automatic Parameterization (From Version 11.0)

Automatic parameterization is a smart feature of QTP, which when enabled can create parameterization at the time of recording and corresponding column is generated in data table. While this option is selected, QTP replaces the constant values of your steps with action parameters and generates a column in data-table corresponding to it. This enables us to create actions that can be used for a variety of different purposes or scenarios by referencing different sets of data.When you stop a recording session while this option is selected, QuickTest replaces the constant values in the test object operation arguments of your steps with either Data Table parameters or action parameters, based on your selection in the Options dialog box.

Steps to activate this option : 

From Tools -> Options under General tab, we have a new option "Automatically parameterize steps using" (shown as below), click the check box.

An example showing the steps generated with the auto-parameterize enabled and disabled.

Option disabled (Data is hard coded)
Browser("Google").Page("Google").WebEdit("q").Set "hello world"

Option enabled(Data is parameterized automatically) 
Browser("Google").Page("Google").WebEdit("q").Set Parameter("q_Text") 'q_Text defaults to "hello world"


No comments:

Post a Comment