User-Defined Templates vs. Instances
Templates are reusable step sequences shared across all your projects. Instances are copies you drop into a test. How edits to a template propagate to its instances, when you can override locally, and why this is different from Run Test.
User-Defined Interactions let you bottle up a sequence of steps as a reusable template, then drop instances of that template into any test. Edit the master template once and your changes propagate to every non-overridden instance across every project — without you having to re-author the steps in each test.
Two things to know about
Template
A template is the master copy of a reusable step sequence. Templates live globally on your Mac, available across every project — not inside any one project.
A template carries a name, a color, the master sequence of steps, and the list of parameters those steps need.
You create a template by saving a test (or a portion of a test) as a template through Mavster's editor — right-click the test header and pick Save as User Defined.
Instance
An instance is what you get when you drag a template into a test. The template's steps are embedded inside the test as a single User Defined step, with per-instance argument values for any $placeholders they use.
Edits propagate from template to instance
To edit a master template, right-click its tile in the Toolbox and pick Edit Steps. (Use Delete from the same menu to remove the template entirely.) Edits to an instance — via the pencil button on the step in the test column — only affect that one instance.
When you save a change to the master template, every instance picks up the change automatically — except for two cases:
- Local override. A step you've edited inside an instance is treated as overridden, and future template edits skip it.
- Locally added steps. Steps you add inside an instance aren't tied to the template, so template edits leave them alone.
Propagation is one level deep — templates inside templates aren't supported.
When to use User-Defined vs. Run Test
Both reuse logic. Pick User Defined when:
- You want the embedded steps visible in the test that uses them.
- You want to edit the embedded steps locally without affecting the master.
- You want parameter values per instance without authoring a full sub-test.
Pick Run Test when:
- You want the called sequence to remain a single owned test with its own history.
- You want deep nesting — Run Test can call Run Test can call Run Test.
- You want the call site to feel like a function call, not an inlined block.
For more on the trade-off see Reusing logic with templates.
