Overview

Step variables (our generic term for all variables we support) are a simple way to inject dynamic data into your tests. When added, the variable acts as a placeholder; when a tester executes your test, they will see the value that corresponds to the variable you’ve inserted. 

Rainforest supports 7 types of step variables. Read on for a brief overview of each variable type. Click into each variable name to learn more about that specific type of variable, including short set-up videos and example use cases:

  • Custom variables : Custom variables allow you to share single values across multiple steps and tests. This is useful for information like a test credit card number,  URL, or any other single value that is reused in many tests or frequently changes. Rather than typing the value over and over again in every test, you simply create a custom variable and then reuse it across your tests and steps. When you need to change the value that corresponds to the variable, you can do so quickly and simply, and the value updates across all tests that contain the custom variable. 
  • Tabular variables: Tabular variables allow you define your own variables in a CSV file and upload them to Rainforest. This allows you to assign each tester unique values that you yourself define. The most common use-case for tabular variables is assigning unique login credentials to each tester, so that testers can execute your tests in parallel in separate test accounts. 
  • Conditional Variables: Take tabular variables a step further by creating environment-specific variables. If you require different login credentials per environment, this is the variable for you!
  • Built-in variables: Built in to Rainforest, these variables generate random and discrete data, such as random first name, random email, random inbox, or random social security number. 
  • Social variables: Social variables automatically trigger the generation of test Facebook accounts upon run initiation.
  • SMS variables: Use Rainforest’s pool of SMS numbers to test your app's ability to send text messages, then use our SMS inbox variable to verify receipt of the SMS, all from within the web browser. No mobile device needed! If you'd like to purchase your own pool of dedicated SMS numbers, check out our Private SMS offering. 
  • Virtual Credit Card: Test real payments in production using Rainforest's Virtual Credit Card (VCC). Rainforest’s VCC are real credit cards that represent real credits and generate real monetary transactions. They can be used any place where major credit cards are accepted. Note: VCC is a feature add-on.  Please contact us to ask about an upgrade.

How to add, view, and manage your variables

This is done on the Step Variables page in the Settings section of your Rainforest account. Click into whichever variable you’re interested in (above) for more information on how to add and manage that variable type in your Rainforest Settings. 

How to insert Step Variables into a test

  1. Within the step editor in a test, click {} step variables to bring up the step variables menu. The variables shown will be grouped by type (e.g. custom variable, tabular variable, etc):

2. Click on any of the step variable groups to reveal all the step variables within it:

3. Finally, click the variable you wish to insert.

The placeholder e.g. {{myvariable.name}} will be replaced with the actual value whenever the testers see it in the test. Want to see for yourself? Go ahead and Preview your test by following the steps in the Gif below!

Did this answer your question?