There are multiple types of variables in Agilitest:
- $param, parameters passed to a subscript
.png)
- $var, script’s variables
.png)
- $prj, project’s variables
.png)
- $env, execution’s variables d’exécution (defined for each playlist or in a command line)
.png)
- $prop, property’s variables in a “properties” type data file
.png)
- $pass, encrypted passwords types of variables
.png)
Among these variables, there are subtypes of variables with a default value:
- $param,
Example: $param(0,data) if parameter 0 does not exist, the character string “data” will be used instead
- $env,
Example: $env(name,data) if the environment variable is not set, then the character string “data” will be used
Other subtypes of variables are nested variables:
- $pass,
Examples: $pass($var(passname)) ; $pass($env(passname)) ; $pass($var(prefix)$env(passname)$param(0))
- $prop,
Examples: $prop(prop1,$var(key)) ; $prop($var(file),key1) ; $prop($var(file),$var(key)) ; $prop($env(lang)-$var(file),$var(key))
For nested variables, their values can be retrieved from the concatenation of other variables.
Example: To retrieve the value of the “key1” key in the “fr-label” file, you will need to have $env(lang)=fr et le $var(file)=label et $var(key)=key1
Example: To recover a password named “pass1”, you will need to have $var(passname)=pass1 ou $env(passname)=pass1