Creating Global Variables For Visual Tests

Global variables are created for use within a visual test, but can be available to any visual test. A global variable is defined in a Set global step using the Assignment properties. Once a global variable is created, it is available to visual tests that execute the visual test in which the global variable resides.

  1. Open the visual test in which you want to create a global variable.
  2. Select the step that precedes where you want to create the global variable.
  3. Choose Insert > Variable > Set Global. The Set global variable step is created after the selected step. Properties for the Set global variable step display in the Properties pane.
  4. In the Properties pane for the Set global variable step, group properties by category.
  5. Update the Assignment category properties to define the name of the global variable and any value to be assigned to it. Once the Assignment category properties are updated and the visual test is saved, the Set global variable step looks like the following: Set global variable 'Global variable name' to 'value'.
  6. Repeat steps 2 through 5 to create other global variables as needed. Once global variables are set, they can be read into local variables in other visual tests. To do this, you must first insert the visual test (containing the global variable) into the visual test that contains the local variables.