Skip to content

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_". The executable will check for environment variables and substitute them for the variable values that were set at build time. This allows you to quickly change a variable value without having to rebuild.

Example Walkthrough

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"

Automation Override Configuration

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.

Automation Override Run 1

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.

Automation Override Run 2