Rainforest Tests: Embedded Tests

Embedded tests in Rainforest Tests and automation

๐Ÿ“˜

Rainforest vs. Rainforest Classic

Rainforest Automation and RFA are now Rainforest tests.

  • Rainforest Tests - Quickly capture UI element with screenshots
  • Rainforest Tests provide easy and efficient test writing for desktop applications. Test execution may be done via Automation Service, Tester Community or On-Premise Testers.

Plain English tests are now Rainforest Classic tests.

  • Rainforest Classic tests - Detail your test case line by line
  • Rainforest Classic tests allow you to write instructions via a free-form English testing writing interface. Tests may be run on desktop applications, mobile browsers, and mobile applications. Test execution is done via the Tester Community or On-Premise Testers.

Overview

Embedded tests leverage individual tests as building blocks. By embedding common instructions, test writing is faster, and updates to the entire test suite can be accomplished more efficiently.

When building a Rainforest test suite, consider instructions that repeat across multiple tests. These may be complete processes, like a login, or a portion of a process, such as filling out a common form. These are perfect candidates for embedded tests. The benefit of an embedded test is that as the application changes, updates to a single embedded test will impact all tests that use the embedded test. Instead of updating instructions two, four or fifty times, updating a single embedded test will permeate the entire suite.

Common embedded tests:

  • Login
  • State setup steps
    Example: setting up an account, adding items to your cart, checkout process)
  • Email confirmation

๐Ÿ“˜

Rainforest vs. Rainforest Classic embedded tests

Rainforest tests may only embed other Rainforest tests and Rainforest Classic tests may only embed other Rainforest Classic tests. When a new test is created, the composition method is critical.
Don't worry, the system keeps track of all this!

Creating and using Embedded Tests

Creating an embedded test is done by simply adding another test to the current test being edited. Any test can ultimately be used as an embedded test. The embedded test may be a previously existing test or a new test can be created.

  1. Create a test. See here for details.
  2. Ensure the steps included in the embedded test make sense and provide a logical start and stop.
  3. There is no need to add a notation such as "[Embed]" or "[Stub]"

๐Ÿ‘

Identifying Embedded tests

Tests that are embedded in tests will automatically have the embedded icon shown on the All Tests page for easy identification. If a test is no longer embedded in other tests, the icon will automatically be removed.

Use the Embedded Status filter on the All Tests page to filter on Embedded Tests and Regular Tests

Embed a test into a test

Adding an embedded test is as simple as adding another step to the test.

  1. Open up a Rainforest test.
  2. Click the dropdown to 'Select action or embed a test'
  3. Scroll to find the test or type to search for the test that you'd like to embed

Embed a test into a previously Embedded test

An embedded test may be embedded into another embedded test. This is referred to as nested embedded tests. An unlimited number of tests can be embedded into a test and may embed up to four levels. So what is the difference?

A test may have multiple tests embedded into it, however, embedded tests allow for nested embeds.
Example:

  1. Open the test to embed a test into
  2. From the Select action or embed a test pulldown, select the embedded test you wish to embed.
  3. Save the steps
    If there are too many levels of embedding, you will not be allowed to select an embedded test, and the Select action or embed a test** dropdown will display Too Deeply Nested*

Too Deeply Nested

Rainforest allows tests to be embedded up to four levels, not including the parent test. If a test is already embedded in four levels, the Too Deeply Nested message will be shown and the test cannot be embedded.

There are a few things you can do to accommodate for this

  1. Include the instructions into another test
  2. Instead of embedding the test down another level, see if it can be added elsewhere and have the instructions still make sense.
    Example: If the instructions occur at the end Embedded Test 4 in the above example, simply embed the test in Embedded Test 3 as the next step after Embedded Test 4

Can't find a test?

Tests that can be embedded are shown in alphabetical order at the bottom of the Select action or embed a test pulldown. If you cannot find a test is is for one of the following reasons:

  • Test no longer exists
  • Test would cause a circular reference to occur
  • Would cause the test to be too deeply nested
    Review the test(s) you wish to embed individually to determine what the underlying constraint may be.

Updating Embedded tests

Embedded tests are updated as you would update any other test. You may select the embedded test from the All Tests page and edit it directly.

You may also select the embedded test from a test it is embedded within.

  1. Simply select the popout box shown on the embedded test.
  2. The test will display in a new tab.
  3. Update it as you would any other test.

Know that any updates that you make to the embedded test will take effect in all tests the embedded test is embedded within.

Using embedded tests

Many tests will begin with an embedded test, such as a login. By embedding common instructions, test writing is faster, and updates to the entire test suite can be accomplished within a single-test update.

To embed a test in a test:

  1. Hover your mouse on the step where you want to add the embedded test
  2. Click the plus to add a step and use the 'Select action or embed a test' dropdown to add an embedded test
  3. Search for the test you wish to embed into this test.
    Tests are listed at the bottom of the Select action or embed a test dropdown box in alphabetical order.
  4. Once found, select the test and it will automatically be embedded.

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

Previewing Embedded Test Steps

After adding an embedded test, select the checkbox for the embedded test, and click 'Preview Actions' to play through and preview the embedded actions. While previewing tests, embedded test expand to aid in debugging.

Embeded Tests Starting URL

An embedded test Starting URL is ignored and the parent test's URL is used instead.
The starting URL is used to preload the platform for test editing.
If the embedded test needs to use a specific URL, add a Navigate action and enter the appropriate URL.

If you have any questions, please feel free to reach out to us at [email protected] or through Intercom!

Updated 2 months ago



Rainforest Tests: Embedded Tests


Embedded tests in Rainforest Tests and automation

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.