Variables

System Testing Supervisor Script Language.

A supervision script may contain integer variables only.

The system implicitly declares variables the first time they appear. The variable must first appear in an assignment instruction.

A variable must have a different name from any logical hostname defined in a HOST instruction, from any logical process name defined in an EXECUTE instruction, and from any RENDEZVOUS name. Otherwise, you will receive an error when scenario execution fails.

Variable names must begin with an upper or lowercase letter or with an underscore (_), followed, if necessary, by a series of letters, digits, or underscore characters.

Variable names are case sensitive. For example, the variable Aa5 is different from the variable aA5.

Example

HOST machine IS 193.6.2.1

EXECUTE proc_1 IS machine:program

i = 1

-- declaration of i

WHILE !ENDOF ( proc_1 )

PAUSE 1

i = i + 1

END WHILE

j = STATUS ( proc_1 )

-- declaration of j

PRINT "execution time "

PRINTLN i

PRINT "return code "

PRINTLN j

Related Topics

Expressions | PRINT | PRINTLN