Response Templating - Random Values
MockLab provides two random value helpers - randomValue
and pickRandom
.
Random value
The randomValue
helper generates random strings of a specific type and length.
Optionally, values containing alphabetic characters can be made upper case via the uppercase
parameter.
Pick random
The pickRandom
helper randomly selects a value from its parameters.
If the first parameter is a collection then the value will be randomly selected from within this:
Otherwise a value will be picked from the list of parameters provided: