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:
- State setup* steps
- Email confirmation
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.
Notice, 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 process.
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 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 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, separate it, and embed instead!
Questions? Unsure where to embed a test? Send us an email at firstname.lastname@example.org 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.