Update Momentic version
Make sure
momentic is installed as a devDependency in the root of your
repository.package.json, Makefiles, and any other files in your
codebase that reference momentic to the latest 2.x version.
Run the migration wizard
This command will update yourmomentic.config.yaml to include feature flags,
Git branch configuration, and AI agent settings.
Run checks for duplicate IDs
Momentic will fail if it detects duplicate command or step IDs. Duplicate IDs are caused by manually modifying tests outside of the Momentic editor, and can lead to test flakiness. To check whether your existing repository has duplicate IDs, run the following command. Problems can be automatically fixed by adding the--fix flag.
Update CI scripts to install browsers
In Momentic 2.0, browsers must be explicitly installed. If your CI scripts do not already invoke theinstall-browsers command, add
this command before any tests are executed.
You can determine which browsers to install by searching your codebase for the
browserType string. See the install-browsers
command for more information.
Update CI scripts to upload results
momentic run now saves all test results to a local directory called
test-results by default.
For the results to be available on Momentic Cloud, add a step to run the
momentic results upload <folder> command, supplying the path to the directory
containing the local test results.
Update deprecated commands and flags
- The
--reportand--no-reportflags are no longer supported. - Using
CI=trueto upload results is no longer necessary and can be removed from CI scripts. momentic import-from-cloudis deprecated and replaced withmomentic import.momentic check-configis deprecated and replaced withmomentic check config.
Update tests relying on automatic tab switching
In Momentic 2.0, switching to newly opened tabs no longer occurs automatically, as this behavior is inherently racy and flaky. If you want to continue using automatic tab switching, you can enable it by adding the following to yourmomentic.config.yaml file:
momentic.config.yaml