Built-In Data
Learn how to generate random data for standard fields such as name, address, and email.
Overview
Use built-in data anywhere in your test steps to automatically generate discrete values for testers to enter. For example, in a signup test, you could provide first names, last names, and email addresses.
Adding Built-In Test Data to a Test Step
- In the step editor, click Insert Test Data to display the test data menu.
- In the pop-up, click any of the built-in data groups to reveal the placeholders.
- Select the placeholder you want to use. Then, click the Save button.
Built-In Data Types
Rainforest breaks out the built-in data types into three groups:
- Date Time - populates the date and time when the test starts.
- Rainforest - populates Rainforest environmental information when the test executes.
- Random - populates randomly generated contact and location information when the test executes.
Date Time
Note: Uses 24 hour clock and based on UTC.
Note: Uses 24 hour clock and based on UTC.
Custom Date Formats
Using any of the built-in time variables, you can specify custom date formats. This works by inserting (%m/%d/%y)
at the end of the string and updating it to fit your needs. For example:
- Today's date in the format DD/MM/YY would be entered as
{{date_time.now(%d/%m/%y)}}
, or for DD/MM/YYYY would be{{date_time.now(%d/%m/%Y)}}
. - Today's date in the format DD-MM-YYYY would be entered as
{{date_time.now(%d-%m-%Y)}}
. - Today's date in the format YYYY/MM/DD the variable would be entered as
{{date_time.now(%Y/%m/%d)}}
. - To use with
{{date_time.week_ago_yyyymmdd}}
, you would enter{{date_time.week_ago_yyyymmdd(%d/%m/%y)}}
for the date a week ago in the format DD/MM/YY.
For more information on formatting, please refer to Ruby docs for more information on how custom date formatting works.
Rainforest
Random
- e.rainforestqa.com/aff9a400-3939-433f-a065-239514a9ee25
Note: Users that join April 2024 or later will get randomly generated passwords that are 10 to 20 characters long, containing a mix of upper and lower case letters, numbers, and at least one special character (! @ # $ % ^ & or *).
- https://s3.eu-central-1.amazonaws.com/rainforest-random-images/001.jpeg
Note: The following data types apply only to the United States:
random.phone_number
random.address_state
random.address_zip
random.address_zip5
random.ssn
Notes on the random.image Placeholder
When using random.image, the image is a hosted file. When the link is opened, it appears in a new tab.
Sample Download Instructions
Action: In a new tab, open {{random.image}}. Right-click the image and select “Save As.” Then, click the Save button in the modal.
Question: Was the image downloaded and saved successfully?
For information on other test data types you can use, see Using Test Data.
If you have any questions, reach out to us at [email protected].
Updated 6 months ago