UFT Classes #13: Parameterization using Data Table | After all the scripts need ‘Test Data’
Follow 'Software Testing Studio' at LinkedIn for more knowledgeable articles!
Now that you know about the concept of UFT Actions, Object Repository and Functions let’s understand how to input Test Data to UFT scripts or parameterization using a Data Table.
Say you are testing a payment initiation form. One of the most important prerequisite is to have relevant Test Data in place, i.e. the values you are going to fill in the form attributes. Now think of it from UFT Automation perspective. What are the options? Hard-coding these Test data values in your automation script is one of them. But what if you need different sets of data for each run of the test case? Yeah! There is no sense in updating the code for each & every run. Then how do you achieve automation? Or how do you tell UFT which Test data to use for Test runs?
Parameterization via Data Table
Parameterization is nothing but telling UFT to how & from where to fetch the Test Data for running the Test cases. One of the simplest method for parameterization is using the “Data Tables”! Data Table is just like Microsoft Excel file, viewable in UFT. Parameterize your test so that it run ten times, each time using a different set of data (row by row). Each iteration should begin with the AUT being the same state and ending in the same state. Always try to return your application to the state where it began.
We have two types of Data Tables: