Host variables

Host variables are stored on host (PC). They can be treated like macros, which are replaced with their values in expressions, before they are given to evaluator. They can be used to store information between tests, and to provide better configurability of tests. They are also used by test creation wizard and can be used in exports.

Definition

Host variables can only be defined in section Variables. They do not have type - values are always treated as strings. They can not be declared table Declarations of test local variables in section Variables, but can have value assigned in table Initialization of local and global variables.

Name of host variable must always start with ${ and end with }:

        ${<varName>}
    
for example:
        ${myVar}
    
Example of section Variables with host variables p1, p2, and stackPattern defined:

Assignments to host variables are possible only in Variables section. Stub and test-point steps can assign values only to target variables (but may use host variables as R-values). Assignments can not be done to reserved host vars.

Where can we use host variables?

Host variables can be used in places, where values are expected: