Prerequisites: These tests must exist locally as YAML files.
Run Momentic mobile tests in the current project. By default, tests will output results to a local directory. You can then upload them to Momentic Cloud using the momentic-mobile results upload command.
npx momentic-mobile run [options] [tests...]
  • [tests…]: The tests to run. If not specified, selects all tests in the current project. You can specify multiple tests separated by spaces, test paths, or folder paths. You can also pass substrings to match test names.

Options

-c, --config <config>

Path to the Momentic configuration file. Defaults to momentic.config.yaml in the current directory.
npx momentic-mobile run --config path/to/momentic.config.yaml

-y, --yes

Skip all confirmation prompts (defaults to true in CI).
npx momentic-mobile run --yes

-p, --parallel <parallel>

Number of tests to run in parallel. Defaults to 1.
npx momentic-mobile run --parallel 3

--log-level <logLevel>

Set logging verbosity. One of: error, warn, info, debug.
npx momentic-mobile run --log-level debug

--output-dir <outputDir>

Directory to store run artifacts (screenshots, logs, results). Defaults to the project’s outputDir or ./test-results. The directory is cleared at the start of a run.
npx momentic-mobile run --output-dir ./mobile-results

--upload-results

Automatically upload test results to Momentic Cloud after the run (equivalent to running momentic-mobile results upload <outputDir> after completion).
npx momentic-mobile run --upload-results

--channel <channel>

Override the default release channel for APK selection during this run (e.g., staging, dev). If omitted and no default channel is configured on the test, Momentic will not install an APK on emulator initialization.
npx momentic-mobile run --channel dev

--tag <tag>

Override the version tag within the selected channel for APK selection. If omitted, each test uses the default tag configured, or the latest uploaded APK in the channel if no default exists.
npx momentic-mobile run --channel staging --tag 0.0.1