|
Summary
eValid supports import of environment variable values
from a user-specified file.
Values are incorporated into the current script
for matching $PARAMETER names
as part of the script preprocessing process.
Command Syntax
EnvironmentVariableFile
command must appear at the beginning of a script.
The file name can be local or it can be a complete path and if does not exist
then no action is taken.
The command format is:
EnvironmentVariableFile "Filename"
File Syntax
The file specified in this command is a text file
that consists of one or more lines that contain
strings of the following format:
$NAME=value
where NAME is the parameter in the script for which you want to substitute value. There is no restriction on the total number of parameters but because each substitution is processed individually it is good practice to keep the number of substitutions requested under control.
Processing Priority
Within the script file the following sequence is used to expand parameters:
All three types of substitution are done as string substitutions. The user must be careful to make sure that an earlier substitution does not intersect with a later $PARAMETER instance. It is a good practice NEVER to use any parameter name for only one meaning.
Note also that scripts can be varied using Play Value Commands that correspond to runtime switches but which are set in-line.
Slashes in File Paths
If you reference a file in the local working folder you don't need /'s or \\'s.
However, it is better (safer, less confusing) practice to
include complete file path names.
If you use /'s fine, but remember to escape any \'s in your path by typing \\.
Special Character Treatment
String values cannot have blanks or certain special characters,
except as described as follows.
To include a special character in a value
string you must include the indicated %number.
Symbol Meaning %20 (Blank Space) %22 " %24 $ %25 % %3D = (Equal Sign) %3d = (Equal Sign, Lower Case Version) %0D \n (Newline) %0d \n (Newline Lower Case Version)
Environment Variables Are Global
Once defined, the substitutions implied by an Environment Variables file
are applied to every script.
If multiple EnvironmentVariables files are processed then the latest-assigned value
for a variable already declared in a preceeding EnvironmentVariables file is the one used.
(i.e. variable values can be replaced with new values).
Processing Priorities
These commands are always read from a script file and processed immediately to take effect
before playback begins:
ProjectID GroupID TestID LogID DataSynthesisFile EnvironmentVariableFile
Processing Constraints
The environment variable command has the following constraints:
Sample Environment Variables File
Here is a sample Environment Variables file:
# Comments are OK in the Environment Variables File. # $Protocol=http $Header=Header $Profile=Test_Profile $Spacer=