What is parameterization in UFT?
To the simplest, when you want to pass the data to the scripts/ test then we use data parameterization
Or
When you want to test the application with multiple set of values then we use the data parameterization. UFT provide ways to accept different test inputs to the test script. This process of providing different input values through external parameters is called as parameterization
Types of parameterization in UFT:-
The variable value can be or the parameter types can be:
The following is the code that you have for one user but you want the same to take different values each time. How do you do this?
Code to sign in to gmail for one user:
SystemUtil.Run "iexplore.exe", "http://www.gmail.com"
Browser("Gmail: Email from Google").page("Gmail: Email from Google").Sync
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set"swatiseela"
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Passwd").SetSecure "sfgs686898"
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebButton("Sign in").Click
Browser("Gmail: Email from Google").Page("Gmail - Inbox").Link("Sign out").Click
Now, go to keyword view and click on the value column for the email id and password set statements.
Typical screen that comes up when you are trying to parameterize:
To the simplest, when you want to pass the data to the scripts/ test then we use data parameterization
Or
When you want to test the application with multiple set of values then we use the data parameterization. UFT provide ways to accept different test inputs to the test script. This process of providing different input values through external parameters is called as parameterization
Types of parameterization in UFT:-
The variable value can be or the parameter types can be:
- Data Table parameters
- Test/Action parameters
- Environment variable parameters
- Random number parameters
The following is the code that you have for one user but you want the same to take different values each time. How do you do this?
Code to sign in to gmail for one user:
SystemUtil.Run "iexplore.exe", "http://www.gmail.com"
Browser("Gmail: Email from Google").page("Gmail: Email from Google").Sync
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set"swatiseela"
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Passwd").SetSecure "sfgs686898"
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebButton("Sign in").Click
Browser("Gmail: Email from Google").Page("Gmail - Inbox").Link("Sign out").Click
Now, go to keyword view and click on the value column for the email id and password set statements.
Typical screen that comes up when you are trying to parameterize:
As you can see, the value can either be a constant, “swatiseela” in this case, the login ID.
Or if you choose the parameterize option then the corresponding fields in the screen get activated.
Or if you choose the parameterize option then the corresponding fields in the screen get activated.