Runtime Override of Variables¶
On a Windows target machine, you can override the value of a variable used in a test case at runtime by setting an environment variable. You need to set an environment variable named like "VECTR_
Below we have a test case configured to query information about a specific user. The username is a variable and is set to "User 1"
We then build the test case and transfer the executable to a target machine. When we run the test case, the command is run with the variable value "User 1". But this user does not exist on the target machine.
We set an environment variable using the naming convention from above. Because the test case variable name is "username", the environment variable name is "VECTR_username" and we set the value to a user that exists on this machine. The test case is run again and the value from the environment variable is used.