Parameters & $placeholders
How $name placeholders work — syntax, escape sequence, the fields that recognize them, and how values are supplied at run time. The mechanism behind data-driven tests and Run Test arguments.
You can write a test once and run it for many inputs (different emails, different plans, different amounts) by writing $variable placeholders into your interaction instructions. Mavster picks up the placeholders, lets the caller (you, a Run Test step, or a User-Defined instance) provide values, and substitutes them before the run starts.
Syntax
A parameter placeholder is a $ immediately followed by a name. The name must start with a letter or underscore, followed by letters, digits, or underscores.
Examples:
| Text in instruction | Detected parameter? |
|---|---|
Type $email into the field | yes — email |
Pay $amount | yes — amount |
Tap on $product_id | yes — product_id |
Tap $1stItem | no — names can't start with a digit |
Price is $$50, plan is $plan | only plan — $$ is escaped |
Look for $ | no — bare $ with no name |
Escaping a literal $
Write $$ to mean a literal $ in the substituted output.
| Instruction | Arguments | Result |
|---|---|---|
Price is $$100, year is $year | year = 2024 | Price is $100, year is 2024 |
Where placeholders are recognized
Substitution scans:
- The test name.
- Every step's instruction.
- A Scroll step's until field.
Other fields (mode pickers, run counts, region settings) are not scanned. If you need a parameter to flow somewhere not in this list, route it through the instruction of the relevant step.
Discovering what parameters a test takes
The editor surfaces a deduplicated list of every $name that appears in your test as the parameter slots that need values.
Providing values
Two ways to supply values.
From a parent test via Run Test
A Run Test step calls another test by name and lets you supply per-call argument values. It also accepts a run count override so you can chain multiple calls with different arguments.
Inside a User-Defined instance
A User-Defined instance carries its own argument values. Whatever you set on the instance is what its embedded steps see at run time.
Substitution timing
Values are substituted once, before the test starts running. Changing an argument mid-run has no effect on the in-flight test. Run history and costs are attributed to the original test, not to a per-run copy.
