Assigning variables to schedule and groups

In addition to assigning variables at the test level, you can assign variables at the A schedule, in this context, is used to refer to both VU Schedule and Rate Schedule. level and User or Rate Runner group level. When you assign variables at the schedule level, all the tests and groups in the schedule can use the variable initial values, if they have the same variable names.

About this task

When you initialize variables at the schedule level, all the groups in the schedule use the variable initial values, except those for which a specific value is defined. If the same variable initial value is defined at the group level and schedule level, precedence is given to the group level and then to the schedule level. If the visibility of a test variable is set to This test only, the test does not use the value that is defined at the group level or schedule level.
If a variable is initialized at various places such as test, compound test, schedule, or user group, the product uses the following order to initialize the value of the variable when running the test. The variable set in the variable table of the compound test editor takes the highest precedence followed by others:
  1. Compound test setting in the variable table UI
  2. Compound test specified in a var file
  3. User group setting in the variable table UI
  4. User group specified in a var file
  5. Schedule specified setting in the variable table UI
  6. Schedule specified in a var file
  7. Command line
Note: You must select All tests for this user from the Visible in drop-down list to take the precedence of variable initialization.

Procedure

  1. In the Test Navigator view, double-click a schedule to open it.
  2. To assign a variable at the schedule level or a group level, in the Schedule Contents area, select a schedule or a group.
  3. In the Schedule Elements Details area, for a schedule select the Variable Initialization category, or at the group level, click the Variable Initialization tab, and click Add.
  4. Type a variable name and its initial value.
    If you have already defined the variables at the test level and want to reuse them, click Select existing variables.
  5. Optional: To use the variables from an existing file, click the Use variable initial values file check box, browse for the file, and click Finish.
  6. Click Options > Save.