The keys 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.
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.
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. Testers are redirected by default, but you can change this behavior under Settings > Sites menu.
3. Redirect settings only affect your account. Each team member will need to set their desired redirect behavior.
4. Using an embedded test as the first step of your test will always redirect your tester to the embedded test's starting URL, regardless of whether that box is checked.
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!
*State setup: Required series of actions to be able to test the process of interest. For example: Signing up, logging in, and confirming the account are the state setup steps required to follow another user on Twitter.