SET_VAR command enables you to create a variable for use within your test case. It provides the following options:
1. Static:
- Based on static value. Example: SET_VAR HALT Static my_static_variable "18"
2. Pattern:
- Based on a regular expression (i.e. RegEx). Example: SET_VAR HALT Pattern my_pattern_variable "[1-9],\d{3},\d{3} (This will generate a number of the format a,bcd,efg where each of these alphabets is a digit)
3. Expression:
- Based on an expression such as @var1+@var2-5 (where var1 and var2 are different variables defined prior to this command). Example: SET_VAR HALT Expression my_expression_variable "@var1 + @var2 - 5"
4. Static / Concatenation:
- Based on concatenation of text such as "Hello" "Adam". Example:
- SET_VAR HALT STATIC my_static_variable "Hello"
- SET_VAR HALT STATIC my_static_variable2 " Adams"
- SET_VAR HALT STATIC concatenated_string "@my_static_variable @my_static_variable2" (resulting in concatenated_string = Hello Adams)
5. Random:
- Based on a fixed length variable that is comprised of a specific alphabet. Example: SET_VAR HALT Random my_dynamic_variable 10 "A-Z1-9" (This will generate a 10 character word that included letters A through Z and digits 1 through 9)
Comments
Please sign in to leave a comment.