Background

The current local format for Momentic tests are YAML files that are directly serialized from Momentic’s internal data model. This has many implications:

  1. There are UUIDs that affect Momentic’s internal behavior in our customer’s codebases
  2. Changes in modules do not cause diffs in test files, which results in users having to manually open the Momentic app to review test updates
  3. The current format is not very readable and is difficult to review in code review

https://github.com/momentic-ai/examples/blob/main/single-project/input-from-csv-test.test.yaml

Goals

Proposal

There are three main changes as part of this proposal.

Human-readable test format

Momentic tests will still serialized to YAML to allow us to capture important configurations and settings like retries, browsers, environments, etc.

Instead of steps containing a list of objects, it will now be a list of strings representing steps. Each string will adhere to a custom grammar. The specific syntax of the grammar is still under development.

Modules will still be in their own .module.yaml file but any tests containing modules will also serialize the contents of that module. This will mean that any changes in modules will result in diffs generated for all tests containing that module.

Example grammar strings:

  1. Type "username" into "the password input"
  2. Click "create button"

Nesting and iframe scoping are prepended: