Momentic improves test performance by caching element data. Most steps run in milliseconds by avoiding repeated AI lookups, while still maintaining accuracy.

How caching works

Caching is automatically applied to most interactive steps such as Click and Type. When these steps are executed, Momentic stores contextual information about the targeted element, including:

  • CSS selectors and HTML attributes.
  • Accessibility roles and metadata.
  • Screenshots and visual cues.
  • Element location and dimensions.

This allows Momentic to reuse known element data across test runs instead of re-identifying it every time.

Momentic will bust the existing cache if the target element changes significantly or if the templated description is different than what was cached.

When caching is applied

  • After a successful step execution during interactive or scheduled runs.
  • When tests are executed via Momentic Cloud or CLI.

When caching is not applied

  • Steps like AI check or Visual diff which rely on dynamic evaluation.
  • Steps with variables or functions that have dynamic values.

Disabling cache

Disabling cache may increase test duration.

You can disable caching on a per-step basis.

This is useful when the target element is dynamic and changes between test runs (e.g., “last item in list”)

How cache keys are generated

Cache keys are based on:

  • The step’s unique ID.
  • IDs of any parent modules.
  • The resolved element description.
  • Dynamic template values (e.g., {{ env.USERNAME }}).

If any of these inputs change, the cache is invalidated and regenerated.

Storage and expiration

Cache data is:

  • Securely stored on Momentic Cloud.
  • Isolated per organization and only accessible during authenticated test runs.
  • Automatically expired after 90 days of inactivity.

Failed steps and caching

Cache is only created when a step successfully executes. Failed steps do not generate or store cache entries.