The key to efficient test suite management
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 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:
- State setup steps (EX: setting up an account, logging in, purchasing items)
- 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 later.
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 in your current test:
- Hover your mouse on the step where you want to add the embedded test
- An Add Step option will appear
- Select the down arrow next to it so that Embed a Test appears
- Type in the ID or the name of the test you wish to embed
- 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 process.
There are a few important notes about redirects:
- 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
- Testers are redirected by default, but you can change this behavior under Settings > Sites menu.
- 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 email@example.com to chat with a testing expert!