Variables and chaining
Fresh data on every run
{{unique}} gives every run fresh test data, so a test that creates an item doesn’t collide with the last run:
Enter "Desk Lamp {{unique}}" in Name
Remembering values from the page
Capture a value the app generates and reuse it in later steps:
Remember the order number as {{order}}
Starts from
Chain tests so shared setup runs once. For example, “Edit the item” starts from “Create an item”, which starts from “Log in”.
- Each test still runs on its own.
- When a setup test fails, the problem is reported once, on the test that broke, instead of on every test after it.
Logins
Put the login in its own test and have other tests start from it. Passwords are filled in from your settings at run time, not stored in the test.