How to use simple templates to generate unique data
testRigor provides as a way to help you to easily generate unique data. For instance, you can generate unique data like phone numbers like this:
generate from template "###-555-####", then enter into "Phone" and save as "generatedPhone"
Which would generate a unique phone number like 752-555-0912
. To do that testRigor uses 4 different symbols to indicate types of data you want to generate: #$%*
.
Unique data generating symbols
Symbol | Description |
---|---|
# |
Generates a random number in range 0-9. |
$ |
Generates a random lower case letter in range a-z. |
% |
Generates a random upper case letter in range A-Z. |
* |
Generates a random alphanumeric symbol, either number, or lower or upper case letter (0-9, a-z, A-Z). |
\ |
If the following symbol is one of the above or another \ then this \ symbol is removed and the following symbol is returned verbatim instead of generating a random symbol. |
Examples
Keep in mind, that testRigor has already a built-in words to generate unique email or unique name. You do not need to provide a template for them. Those would work like so:
generate unique email, then enter into "Email" and save as "newEmail" generate unique name, then enter into "Name" and save as "generatedName"
Example | Description |
---|---|
generate unique email, then enter into "Email" and save as "newEmail" |
Generates a random email in testrigor-mail.com domain. |
generate unique name, then enter into "Name" and save as "generatedName" |
Generates a random name. |
generate from template "$******************************@testrigor-mail.com", then enter into "Email" and save as "newEmail" |
Generates a random email in a custom domain. |
generate from template "###-###-####", then enter into "Phone" and save as "generatedPhone" |
Generates a random phone number. |
generate from template "811-###-####", then enter into "Phone" and save as "generatedPhone" |
Generates a random phone number in a 811 area code. |
generate from template "000-##-####", then enter into "SSN" and save as "generatedSsn" |
Generates a random SSN number. |
generate from template "4###-####-####-####", then enter into "card" and save as "generatedCard" |
Generates a random VISA credit card. |
generate from template "https://$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.info", then enter into "url" and save as "generatedUrl" |
Generates a random URL. |
generate from template "%******************************", then enter into "data" and save as "generatedData" |
Generates a random alphanumeric data. |
generate from template by string with escaped parameters "${nowDateTimeIso}-**********", then enter into "Data" and save as "generatedData" |
Generates a random alphanumeric data starting with date-time in ISO format. |
generate from template "%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$.", then enter into "description" and save as "generatedDescription" |
Generates a random text description. |
More complex use cases in some cases might require ReGex and can be found here