Thursday, July 16, 2015

Local and Global Data Tables

Each action also has its own sheet in the Data Table so that you can insert data that applies only to that action. When there are parameters in the current action’s sheet, you can set Quick Test to run one or more iterations on that action before continuing with the current global iteration of the test.
The Global sheet contains the data that replaces parameters in each iteration of the test. When you run your test, Quick Test inserts or outputs a value from or to the current row of the global data sheet during each global iteration.


 Using the Data Driver to Parameterize Your Test


The Data Driver enables you to quickly parameterize several (or all) objects, methods, and/or checkpoints containing the same constant value within a given action. Similar to a ‘Find and Replace All’ operation versus a step-by-step ‘Find and Replace’ process, you can choose to replace all occurrences of a selected constant value with a parameter. Quick Test can also show you each occurrence of the constant so that you can decide whether or not to parameterize the value.
To parameterize a value using the Data Driver:
  • Display the action you want to parameterize.
  • Choose Tools > Data Driver. The Data Driver scans the test for constants (this may take a few moments) and then the Data Driver opens.
    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.
By default, the list displays only the following constants:
The argument value of each Set method
The argument value of each Select method
The value of the second argument (Value) of each SetTOProperty method
  • 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 OK. The constant is added to the list.
  • 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.
If you selected Step-by-step parameterization, click Next. The Parameterize the Selected Step screen opens.
If you selected Parameterize all, the Parameter details area is enabled in the Data Driver main screen. Select your parameterization preferences the same way that you would for an individual step.
  • In the Step to parameterize area, the first step with an object property, method argument, or checkpoint value containing the selected value is displayed in the test tree on the left. The parameterization options for the step are displayed on the right.
    By default, the value is parameterized as a Data Table variable. Accept the default parameterization settings or set the parameterization options you want to apply to this step.
§  Click Next to parameterize the selected step and view the next step containing the selected value.
      • Click Skip if you do not want to parameterize the selected step.
      • Click Finish to apply the parameterization settings of the current step to all remaining steps containing the selected value.

  • If you clicked next in the previous step, and steps remain that contain the selected value, the Parameterize the Selected Step screen opens displaying the next relevant step. Repeat step previous for each relevant step.
If there are no remaining steps containing the selected value, the Finished screen opens.
  • Click Finish. The Data Driver Wizard closes and the Data Driver main screen shows how many occurrences you selected to parameterize and how many remain as constants.

No comments: