Your e-Business Quality Partner eValid™ -- Automated Web Quality Solution
Browser-Based, Client-Side, Functional Testing & Validation,
Load & Performance Tuning, Page Timing, Website Analysis,
and Rich Internet Application Monitoring.

eValid -- Environment Variable File Command
eValid Home

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:

  1. Reserved Variables which reflect conditions of the playback.
  2. Environment Variables, which are set by the user in a file identified with the EnvironmentVariableFile command.
  3. Variables that are passed to the script via $NAME=value arguments in CallScript, GoScript, and -DATA type commands.
  4. Variables that are established through expansions that arise from a DataSynthesisFile command.

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:

  1. Only the first-named, first encountered Environment Variables file has any effect in the current script. Instances of the EnvironmentVariableFile command after the first one are ignored.
  2. Only the first instance of any left-hand-side name is available. This means that if you re-define a variable value in the [single] EnvironmentVariableFile the re-definition will NOT override the first occuring one.
  3. The EnvironmentVariableFile command does not have to be in a particular sequence, and it can be in a file that is the subject of a CallScript. However, the "first file encountered" rule still applies.

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=