Skip to main content
Run a browser test against your app and save it as YAML in your repository.

Setup with coding agent

Paste this prompt into your coding agent from your project directory. It installs Momentic, checks setup, and asks which flow to test.
Setup prompt

Prerequisites

Use Node.js 22.12 or later in the 22.x line, or 24 or later, a Momentic account, and a project with a package.json. Run npm init -y if you don’t have one. Commit it with the lockfile so local runs and CI use the same CLI version.
1

Install with the wizard

Run this from your project root and complete browser sign-in:
Select web testing. The wizard installs the CLI and Chromium, writes momentic.config.yaml and a sample under web/, runs the sample, and offers coding agent setup. A passing sample checks your installation against Momentic’s demo site, not your app.Already configured? Skip the wizard. For separate install, sign-in, and initialization commands, see the CLI reference.
2

Create a test

Open the local editor from your project root:
Create a test, set your app’s base URL, and fill in Description. Pick one flow with an observable outcome. Add an action, then an assertion for the resulting page.No app ready? Use https://practicetestautomation.com/practice-test-login/ with the action and assertion below:
Keep the action and assertion separate. The action tells Momentic what to do; the assertion checks what the user sees afterward. Replace the practice credentials with a test account when you switch to your app.
3

Save and run

Save the test as a .test.yaml file and run it in the editor. Then run the saved file from your terminal, replacing the path:
The command prints test totals and a dashboard link. Without --upload-results, result artifacts stay on your machine. See AI data use for data sent during execution.
4

Review the result

Open the dashboard link and inspect the assertion screenshot. Confirm the run passed and the page matches your expectation. If it fails, check the URL, sign-in state, and assertion before editing and rerunning.Keep the saved YAML in version control with your app. You can run the same file from your terminal or CI without recreating the steps in the dashboard. See local runs for selecting files and environments.
Momentic web editor with a login practice page open beside the test steps

Create a browser test in the local editor

Next