Ideal Scope of a Rainforest Test
Learn how to create an effective Rainforest regression test case.
Writing a good functional test case means ensuring the scope aligns with the feedback you care about. In other words, you should avoid cramming too much into a single test.
Ideally, a test case should represent a straightforward user activity. In the e-commerce world, you might leave a review for a past purchase or create a new account.
While testing both activities in a single test case might be tempting, each set of actions represents a different activity—and a separate test case.
Over time, creating tests that are broad in scope makes it difficult to measure results. Better to keep tests short, modular, and confined to a specific function or user flow.
Poor Example 1
Sign up as a new user using an invalid email address and confirm that the system raises an error. Then, sign up with a valid email address and password. Now, search for an Airbnb stay in Paris, France, and verify the results.
Lumping together unrelated user actions results in a test that is unfocused.
Poor Example 2
Click the sign-up button and confirm that a sign-up modal appears.
Here, the scope is too narrow; no useful activity can be completed.
Good Example
Log in to Airbnb using an email and an invalid password. Confirm that the system raises an error.
This is a suitable test case with a well-defined outcome.
To keep tests modular and simplify test suite maintenance, we recommend Embedded Tests. You can use these pre-written modules as building blocks when creating test cases.
Additional resources:
- For a more tactical approach to creating Rainforest tests, check out our Deep Dive: Building Your First Test Suite guide.
- To learn about QA strategy, refer to our Introduction to QA Strategy guide.
- As your process matures, consider setting up seeded states to minimize the steps required to put test accounts in a specific state for testing. Check out our Seeded State Management guide.
If you have any questions, reach out to us at [email protected].
Updated 4 months ago