Prerequisites: These tests must exist locally as YAML files.

List tests in the current project.

npx momentic list [options] [tests...]
  • [tests…]: The tests to list. 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. If not specified, it defaults to momentic.config.yaml in the current directory.

npx momentic list --config path/to/momentic.config.yaml

-f, --filter <filter>

Only applicable when using Workspaces. Loads the project with the specified name.

npx momentic list --filter workspace-name

--labels <labels...>

Run tests with the specified labels. This allows you to filter tests based on assigned labels.

npx momentic list --labels smoke regression

--include <includePatterns...>

Only include tests that match the provided regex patterns. Multiple patterns can be provided. The patterns will be matched against the test file paths and the pattern only needs to match a part of the path for the test to be included.

npx momentic list --include "billing*"

--exclude <excludePatterns...>

The opposite of --include: a test that matches any of the provided regex patterns will be excluded from running.

npx momentic list --exclude "billing*"