Embedded tests allow you to reuse pre-written tests like building blocks. By embedding common instructions, test writing is faster, and updates to your entire test suite can be accomplished within a single-test.

Writing embedded tests 

When building out your Rainforest test suite, consider any instructions you might need to repeat across different tests. These may be complete processes, like a login to access your app, or a repeating portion of a process, like the steps for filling out a form. These are perfect candidates for embedded tests.

Some common embedded tests:

  • Login
  • State setup* steps
  • Email confirmation

Create a standalone test with only the required steps for the process you want to embed. Tag the test with #embed, #stub, etc. to easily identify and search for these tests.

Using embedded tests

You can embed a test at any point during test writing. Many tests will begin with an embedded test, such as a login. Some tests may use embedded tests like building blocks, avoiding writing out repeating processes.

To embed a test, click the “Embed a test” button in the lower menu and begin typing either the test title, or the test number. A list of matches will appear. Click the test that you wish to embed, and the steps will appear in the steps list, indicated as an embedded test.

Note: if you want to redirect the user after the embedded test, click the "REDIRECT TESTER" checkbox. This will redirect the tester to the "Test URL" which you can set at the top of the screen.

Note: If the testers are already in the right place to proceed with the instructions, remember to click to cancel the redirect. 

Testers are redirected by default, but you can change this behavior within the Sites menu.

Note: Redirect settings only affect your personal account. Each team member will need to set their desired redirect behavior.

Updating Embedded tests

Embedded tests are key for efficient test suite management. To revise an embedded test, simply update the original standalone test. This can be done by navigating to the test, or by editing the Embedded Test directly from the test that it is embedded into.

The instructions will automatically update in any test it has been embedded in.

Anywhere you find yourself repeating a step you’ve already written, separate it, and embed instead!

Questions? Unsure where to embed a test? Send us an email at support@rainforestapp.com to chat with a testing expert!


*State setup: Required series of actions to be able to test the process of interest. For example: Signing up and confirming your account are the state setup steps required to add follow a user on twitter.

Did this answer your question?