The key to efficient test suite management

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

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 (EX: setting up an account, adding items to your cart, purchasing items)
  • Email confirmation

Create a standalone test with only the required steps for the process you want to embed. Append the test title with "Embed" or "Stub" 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 will have several embedded tests throughout them.

To embed a test in your current test:

  1. Hover your mouse on the step where you want to add the embedded test
  2. An Add Step option will appear
  3. Select the down arrow next to it so that Embed a Test appears
  4. Type in the ID or the name of the test you wish to embed
  5. Once found, select the test 

To embed a test as the last step in your test, select Add A Step at the top right of the screen and repeat the above steps

An embedded step may be moved up and down within the test as you would move any other step in the test. 

NOTE: A redirect to a URL is automatically included. This URL comes from the embedded test settings and navigates testers to the right place before beginning the embedded step(s).

There are a few important notes about redirects:

  1. You can change whether a tester is redirected or not by clicking on the Redirect Tester checkbox. A check in that box indicates a tester will be redirected to the embedded test's URL.
  2. If the first step is an embedded test, the redirecting option is Use Embedded URL works the same way as Redirect Tester 
  3. Testers are redirected by default, but you can change this behavior under Settings > Sites menu.
    Redirect settings affect your account only. 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 process, simply update the original standalone test. The instructions will automatically update in any test it has been embedded in.

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

Questions? Unsure where to embed a test? Send us an email at to chat with a testing expert!

Did this answer your question?