Random values

Use random numbers or strings for your step properties to generate them at runtime. For example, test an entire workflow where the exact values aren't crucial.

This topic describes the types of random values you can generate in your simulation.

Generate random text

To generate a random mix of numbers and letters, use the syntax {RANDOMTEXT[<length of random text>]} in the Insert step property.

Generate random number

You can create random numbers as a value for a message element.

  • Specify a random number using one of these methods:

    • To generate a random number with a maximum length, use the syntax {RND[<Length of random number>]}. You can have a maximum of 19 digits.

    • To generate a random number within a range, use the syntax {RND[<Lower limit>][<Upper limit>]}. The lower limit must be less than the upper limit, and negative values are possible. The generated integer is a value between the upper and lower limit, including boundaries.

  • Use the Insert step property to define a random number.

Generate unique IDs

You can create a unique ID as a value for a message element. Unique IDs are generated sequentially, and each ID is assigned only once. Specify the length of the unique ID using the syntax {UNIQUEID[<length of uniqueID>]} in the Insert step property.

If there aren't enough IDs available and the system can't generate new IDs, an error occurs. Restart the environment to reset the unique IDs, or increase the length of the unique IDs.

Generate random strings with regular expressions

To generate a random string based on Microsoft regular expressions, use the syntax {RANDOMREGEX["<Regular expression>"]} in the Insert step property. For information on the rules and syntax of regular expressions, see the Microsoft REGEX documentation (opens in new tab).

Specify a time stamp

The dynamic expression {TIMESTAMP} returns the number of milliseconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.

Specify a time stamp using the Insert step property.

Use a counter

Use the dynamic expression {COUNTER} to set how many times a specified message should be sent or received before proceeding to the next step.

Use a counter with the Insert step property.