Random Variables Section

All random variables used in a Silk Performer test script are defined in the random variables section. Random variables are used for generating random input values, specifying random repetition factors, specifying the probability of running transaction components, and specifying random user times.

One script may include more than one random variables section, although each random variable must be defined before it is used.

Random variables are defined using the keyword dclrand.

Note: Certain random types can be used directly within transactions, without the need to define a random variable.

The scope of a random variable is the whole Silk Performer program (global scope). A random variable is defined by its type and its range of values. The type of a random variable is specified by using its random type (distribution type) in its declaration. The range of values of a random variable is specified by the parameters of its random type declaration. Each time a random variable is used, the random type of the random variable generates a new random value.

The use of random variables in BDL is very similar to function declaration and calling in high-level programming languages. Silk Performer distinguishes between two kinds of random types:
  • Random types based on continuous distribution functions
  • Random types based discrete distribution functions


RandVarPart = RandVarDcl { RandVarDcl }.

RandVarDcl  = IdentList ":" RandVar ";".

IdentList   = ident { "," ident }.

RandVar     = RndExpF | RndUniF | RndUniN| RndUniI
            | RndStr | RndExpN | RndInd | RndBin
            | RndPerN | RndFile| RndStream.