Forum

Forum Navigation
You need to log in to create posts and topics.

Timestamp-based data generators

As we have shown before, you can use regular expressions "in reverse" to generate random data. In the picture below you can see an example of the setup for generating an email address

You can use this by typing

/BZ-email/

We also have the date-generators, which are rather self-explanatory

/{today}/
/{last-month|yyyy-mm-dd}/
/{date:30/01/2021"+1y|dd/MM/yyyy}/
/{tomorrow}/

These are all very useful, and handles most cases. In some cases, generating random or specific data isn't enough. For instance, we have found some cases when a unique number or name needs to be used. Instead of using '/BZ-name/' or '/BZ-number/', we instead introduce random data generators based on timestamp.

/{timestamp}/
/{textstamp}/

Here, '/{timestamp}/' generates a 10-digit number based on the timestamp, like "1606860036", and '/{textstamp}/' generates a seven-character String based on timestamp, like "1RLPL8L". This is really useful when need to generate keys that needs to be unique, for instance in fields that act like primary keys in the target application.

Note: The first part contains the worker id, which guarantees that the generated Number or String will be unique, even when two workers call the function in the exact same time. 

 

Try Boozang today

Codeless testing that works. No credit card or commitment required.