before, steps, and after.
Web (momentic) and mobile (momentic-mobile) are separate CLIs that share the
same simplified format. Their file types and available top-level fields differ
where the platforms require it.
Test and module files
A test has afileType, a readable kebab-case id, and a list of steps. A
module uses a module fileType and adds a human-readable name. Both use id
as their stable identifier.
- Web
- Mobile
A web test can set its starting
url.checkout.test.yaml
log-in.module.yaml
{ name, default?, enum? }. default is a value
object ({ string } or { javascript }) used when an invocation does not
supply that parameter. See Modules for parameter
defaults, inputs, and caching.
IDs
Every test and module ID must be unique across your Momentic organization. When Momentic creates a file, including through MCP, it assigns a readable slug such assilver-river-lantern. Generated IDs do not have a fixed number of words.
Keep the ID if you rename or move the file.
When authoring YAML by hand, choose any lowercase kebab-case slug up to 36
characters, such as checkout or guest-checkout. Keep it stable after the
file is created. UUID IDs from older files remain valid.
Before and after sections
Tests can declare optionalbefore and after arrays alongside steps. All
three arrays use the same step syntax. In the editor,
before is Setup and after is Teardown.
checkout.test.yaml
beforeruns first, followed bysteps, thenafter.- If a
beforestep fails, the main steps are skipped and the test is marked as a setup failure. afterruns after the main steps whether they pass or fail. Use it for teardown such as resetting state or deleting test data.
before for prerequisites the main steps assume, most commonly
authentication.