Wednesday, December 2, 2009

30. Parameterization:


We can parameterize the value by two methods
1. Parameterize through Data Driver Wizard.
2. Parameterize through the Keyword View.


30.1. Parameterize Through Data Driver Wizard:
The Data Driver enables you to quickly parameterize several (or all) property values for test objects, checkpoints, and/or method arguments containing the same constant value within a given action.
(Or)
Data Driver Wizard is used to convert the Templates and it’s Input from the Script to the Data table (Designed Time Data Table).


To parameterize a value using the Data Driver:
Step 1:
Generate the Script by Using the Record Button for Particular application.
Step 2: Choose Tools > Data Driver.
Quick Test scans the test for constants before the Data Driver opens (this may take a few moments).


Note: If the action being scanned contains a large number of lines and constant values, Quick Test warns you that loading the constants may take some time. You can choose whether to wait for the constants to load, or to open the Data Driver wizard quickly without constants.
The Data Driver displays the Constants list for the action. For each constant value, it displays the number of times the constant value appears in the action.


Step 3: If you want to parameterize a value that is not currently displayed in the list (such as an object property value), click Add Value. The Add Value dialog box opens.
Enter a constant value in the dialog box and click Add. The constant is added to the list.


Note: You can add only constant values that currently exist in the test action.


Step 4: Select the value you want to parameterize from the Constants list and click Parameterize. The Data Driver Wizard opens.
Step 5: Select the type of parameterization you want to perform:
Step-by-step parameterization. Enables you to view the current values of each step containing the selected value. For each step, you can choose whether or not to parameterize the value and if so, which parameterization options you want to use.
Parameterize all. Enables you to parameterize all occurrences of the selected value throughout the action. You set your parameterization preferences one time and the same options are applied to all occurrences of the value.
Step 6: If you selected Step-by-step parameterization, click Next. The Parameterize the Selected Step screen opens.
If you selected Parameterize all, the Parameter option is enabled in the Configure value area. Select your parameterization preferences the same way that you would for an individual step.
Step 7: Data Driver Wizard-Parameterize the Selected Step dialog box appears.
Step 8: Select Parameter Radio button and click on browse button (Parameter option).
Step 9: Parameter Option dialog box appears, in the Name field enter the Template Name.
Step 10: In Location in the Data Table select the Global Sheet or Current action sheet (local) to insert the data, and click on Ok.
Step 11: Click Next, and Click on Finish to insert the data.
Step 12: Do the same step to insert the new datas.
Step 13: Through the data table (Designed Time Data table) apply the multiple no of Inputs.
Step 14: Execute the script to check the Result.


30.2. Parameterizing through the Keyword View.
When you test your applications, you may want to check how the application performs the same operations with multiple sets of data. Forexample, suppose you want to check how your Web site responds to ten separate sets of data. You could record ten separate tests, each with its ownset of data. Alternatively, you can create Data Table parameters so that your test runs ten times, each time using a different set of data. this way of setting parameters is called parameterization.
Step 1: Enter the Script for the particular application.
Step 2: open the keyword view, select the Input (that you want to parameterize) in the value field.
Step 3: Now it shows parameter option button, just click on it to open the Value Configuration options.
Step 4: In the Value Configuration Options just select the Parameter Radio Button.
Step 5: In Value Configuration Option dialog box select Name field and modify the name which you want enter as a template in the Data Table.
Step 6: In the Location in Data Table select the Data Table you want to insert (Global Sheet and Current Action Sheet (local)).
Step 7: Click on Ok to insert the selected value in the Selected Data Table.
Step 8: Do the same step to apply for more no of Templates.
Step 9: Enter the Multiple number of inputs through the data table for the Particular Script.

No comments:

Post a Comment