Random Values in Checks

Random form values allow you to automatically generate email postfixes to avoid getting a duplicate email error caused by forms that follow a unique email validation rule. This article will show you how to use random values to monitor your forms.

Note

Many servers (including Gmail) allow you to add a postfix with a plus (+) after a main address.

In other words, testmail+value@testomato.com will send emails to testmail@testomato.com.

You can generate random form values by entering an email like the following in your form:

Testomato then automatically adds a 5-character random string after the main address.

This helps you monitor forms in two ways:

  • You can finish your registration process without receiving an error.
  • You’ll be able to easily separate your testing account from real user accounts.

How to Register a Random User

We created a sample Testomato signup form form for this guide that will return a simple green alert when data is sent successfully.

Sign UP
  1. Click on the project you’d like to view.
  2. Add new Form check page and enter the page URL: http://www.testomato.com/example/signup/.
Add form check Enter URL
  1. Select the form you’d like to configure.
Add form check
  1. Enter your credentials.
Login: testmail+%5TestomatoRnd@testomato.com
Password: mypassword
Enter credentials
  1. Create a new Rule for text on page contains and type the following string: New user .* created.
Enter check
  1. Click Create.

How to Test a Random Login

  1. Click on the project you’d like to view.
  2. Click Configure form values for the check you’d like to configure.
  3. Enter the following data you’d like sent to your form and click Save.
login: user%5TestomatoRnd
password: mypassword
  1. Select the box next to My Rules.
  2. Enter the expected message you’d like to see. For example, we used the message: User not found.
  3. Click Save.