Prerequisites: These tests must exist locally as YAML files.
momentic results upload
command.
Arguments
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
Path to the Momentic configuration file. Defaults to
momentic.config.yaml in
the current directory.Only applicable when using Workspaces. Loads the
project with the specified name.
The environment to run the test in. Overrides any environment specified by the
test.
The base URL set on the test always takes precedence over the environment. If
you want to override the base URL set on the test, use the
--url-override
option instead.Override the base URL set on the test or environment. Useful when running
tests against a different URL (e.g., a preview deployment) than the one
specified in the test or environment.
Name to associate with this run for easier identification in the Momentic
dashboard. Also used as the base filename for generated reports.
Custom headers to include in the test run. Specify multiple headers separated
by spaces.
Path to a CSV file containing input data for the tests. Each row is used as
input for a separate test run. See Data-driven
tests for details.
Number of tests to run in parallel. Each test starts its own browser instance.
Useful for speeding up execution on large test sets.
Number of times to retry a test if it fails.
Maximum number of minutes to run tests before stopping. When the timeout is
reached, currently running tests will be stopped, results will be written to
disk, and a summary will be printed. The process exits with code
1. Useful
for CI pipelines that need to enforce a maximum execution time.Run only tests that match the specified labels.
Directory to store run artifacts such as screenshots, results, and logs. The
directory is cleared at the start of execution. Defaults to
./test-results.Upload test results to Momentic dashboard after the test run. Equivalent to
running
momentic results upload <outputDir> after completion, where
<outputDir> is the directory specified by --output-dir (defaults to
./test-results).Reporter to use for the output. One of
junit, allure, playwright-json,
or buildkite-json.Directory where reporter output will be saved. Defaults to
./reports.Reporter filenames are based on the run name. For example, junit writes
{name}.xml and buildkite-json writes {name}.buildkite.json. The name comes
from --name when provided; otherwise, the detected project’s name from
momentic.config.yaml is used. For buildkite-json, scope comes from the run
name and name comes from the individual test name.Index of the shard to run (1-indexed). Used with
--shard-count to split
tests across multiple machines or processes.Total number of shards. Used with
--shard-index to split tests across
multiple machines or processes.Only include tests whose file path matches any of the provided regex patterns.
The pattern only needs to match part of the path.
The opposite of
--include: tests whose file path matches any of the provided
regex patterns are excluded.Skip quarantined tests entirely. By default, quarantined tests run but their
statuses do not impact pipeline success or the exit code of the process.
Run only quarantined tests. Their statuses impact pipeline success and the
exit code of the process.
Run all tests and apply their statuses to pipeline success and exit code.
Disable caching entirely. Steps run without cached data and no caches are
saved after the run. This can result in slower execution but ensures all steps
run fresh.
Always save updated step caches after successful test runs, even on the main
Git branch and protected branches. See cache saving
eligibility for more
information.
Run the test without using any existing caches. Step caches are still saved at
the end of the run. Useful for updating caches after changing a configuration
option.
Update the golden files for Visual diff. See Visual
testing.
Record videos of test runs. Enabling this increases the size of results. Once
uploaded, videos can be viewed in the run viewer. Requires
ffmpeg, which can
be installed via momentic install-browsers ffmpeg. Use the bare flag or pass
true, false, or on-fail.Command to run before starting the test. Useful for starting a local server or
any prerequisite process.
Resource to wait for before starting the test. Can be a URL, a file, or any
other resource supported by
wait-on. Useful for ensuring the
resource is available before tests start.HTTP proxy to use when polling the
--wait-on resource. Provide the full
proxy URL, including protocol, optional credentials, host, and port.Timeout (in milliseconds) for the
--wait-on option. If the resource is not
available within this time, the test fails.