The V1 CLI can automatically migrate from the V0 directory structure while preserving your test and modules data. Please review the breaking changes between the V1 and V0 versions and backup all existing assets before proceeding.

Changes

Migration steps

Please migrate all users and CI scripts to the V1 CLI at the same time to avoid disruption. The V0 CLI is not compatible with the V1 directory structure.

1

Navigate to your v0 directory root, which should contain a folder called momentic.

2

Run the migrate command:

3

Modify momentic CLI invocations in any scripts to conform to the new command syntax: - The --local / --remote flags are no longer supported. Please use momentic@latest queue to run tests/suites remotely and momentic@latest run to run entities locally.

4

If any of your tests reference the special results variable, you need to modify them to conform to the new context management system:

  • Open the momentic directory in your preferred text editor. Search for instances of results[ in all Momentic YAML files.

  • Open each affected test or module in the app (npx momentic@latest app) and replace the results reference with an env reference. You may need to toggle the Save to environment variable option on for the step that is expected to produce the result.

5

If desired, delete hardcoded environment variables from momentic.config.yaml and place sensitive values into .env files or shell environment variables that are available to Momentic at runtime.

6

If desired, commit all Momentic YAML files to your source control repository to facilitate collaboration with other team members.

After migrating, you may move your Momentic tests and modules around anywhere in your project. Note that the migration will remove the environments and fixtures folders from your local machine, if they exist. This is expected as the environments configuration is migrated to the momentic.config.yaml.

Was this page helpful?