Parametrize your tests
Automated tests are easiest to maintain when you don’t hard‑code values that are likely to change. With variables, you can parameterize URLs, user accounts, and other inputs once and reuse them everywhere in a test - or override them when you run it. This lets you keep a single test working across environments and datasets without re‑recording anything.
Use variables for any value that might change
Any piece of data you type that isn’t completely static should be a variable:
- URLs / environment (staging vs production)
- Email addresses, usernames, phone numbers
- Passwords (and enable hiding the value to keep it safe from peeking co-workers)
- Product names, prices, dates
When you’re recording or editing a test, you can turn any piece of text (a URL, email, user name, etc.) into a variable by giving it a name and a default value. For example:
login_email→ default:[email protected]base_url→ default:https://staging.myapp.comusername→ default:john.aiva.test
AIVA will then automatically use that variable wherever it appears in the test steps. This gives you two big wins:
- Reuse inside the same test – Type the value once (e.g., fill the username box with the value
from
usernamewhen creating an account) and then assert it appears on the page (Check that the user profile contains the text fromusername). No copy-paste mistakes. - Run the same test with different data – The test works out of the box with the default values. In a batch (or when scheduling a run), you can override any variable for that run — change the environment, try a different user, or test with new data — and every step that uses the variable instantly picks up the new value.
Variables are defined per test, but when you run a batch you can override them by name across all tests at once. Change it in one place, and everything updates automatically.