Subscribe by Email


Saturday, August 25, 2012

Explain data parameterization in WinRunner?


Whenever you subject your software system or application to testing, it is obvious for you to think of checking how your software system or application performs with some other multiple sets of data. 
For this what do you do? 
You create some data driven tests with some loops that runs a certain number of times or we can say which runs for how many different sets of data you want the application to be tested with. Each time the iteration of loop takes place, it leads to the testing of the software system or application with a different set of data.
But the winrunner will not simply execute such loops! 
- To make the winrunner use that data for driving the tests it is necessary that you link the data with the particular test script which you want it to drive. 
- This process of linking the data with the test script that it’s going to drive is called parameterizing of the tests.
- The data sets are recorded in the form of a data table. 
- The process of parameterizing the tests can be either carried out manually or you can take the aid of the data driver wizard. 
- The data driver wizard will not only help you in parameterization of your tests but will also help you in storing the data in the data table.
- The conversion of a test in to a data driven test is composed of four major steps and out of which the first important step is the parameterization of the test itself. 
- The process involves the replacement of the fixed values in the following statements:
  1. check point statements
  2. in recorded statements with parameters
- In the next step in this process you have to deal with the setting up of a data table which is suppose to store the values that are to be fed as the arguments to the test. 
- This marks the completion of the parameterization process. 
- Later, the statements and functions are added to the test so that they can be read from the data table and can execute in a loop during each iteration of the loop. 
- Statements are added to that script which is responsible for the opening and closing of the data table. 
- This whole process becomes less head ache when carried out with the help of the data driver wizard. 
- With its aid you can either convert just a part of your script or whole of your script in to a data driven test. 
- In some cases, it happens that even though your test scripts consists of check points, recorded operations, statements etc there is no need to parameterize them, you just want to parameterize the rest of the part of the test script that will be run with multiple sets of data in a loop. 
- In data driver wizard the fixed values in recorded statements and selected check points are replaced by the function “ddt_val”. 
- This function also adds the columns containing variable values to be assigned as parameters. 
- A test script may consist of several statements containing the fixed values entered by the user. 
- There is a dialog box named as “parameterize data dialog box” that can be used for the effective and quick parameterization of the statements and replacement of the data with parameters. 
- For doing this, you need to select the particular instance which consists of the data that is to be parameterized. 
- Then, go for the parameterize data option in table menu and the box opens.
Select the data table and enter the name for the table. 
- Then hit the “add the data to the table box” option. 
- Later, the data in this table can be modified. 


No comments:

Facebook activity