Skip to main content
Prints one test file path per line for every test in the current project that matches the provided filters. Intended to be piped into other commands. Requires tests to exist locally as YAML files.

Arguments

array
Tests to list, given as test file paths, directories, or test-name substrings. Defaults to every test in the current project.

Common flags

string
Path to the Momentic configuration file. Defaults to momentic.config.yaml in the current directory.
string
When using workspaces, load the project whose name matches the filter.

Filtering

array
Only list tests with one of the specified labels.
array
Only include tests whose file path matches any of the provided regex patterns. The pattern only needs to match part of the path.
array
Exclude tests whose file path matches any of the provided regex patterns.
boolean
Only list tests changed against the base branch: changed test files plus tests that use a changed module (it lists those affected tests, not the module files). The base branch is auto-detected from the CI pull request, or origin/HEAD. Requires the checkout to have full git history. Pipe into run to re-run only what a Momentic auto-heal PR touched.

Examples

List every test in the project:
List tests under a specific folder:
List tests with the smoke label, then pipe into run:
Validate an auto-heal PR by running only the tests it changed: