Next: , Previous: endloop keyword, Up: Test Case control


5.7.15 if else and endif keywords

The if, else and endif keywords can be used for conditional execution in the script. The condition for if must be variable or value. Value 0 and string "false" (case insensitive) is interpreted as false, other values as true. If block must always be closed with endif keyword. Nesting of if-blocks is supported.

     var v
     if v
       print is true
     else
       print is false
     endif