Skip to main content

Documentation Index

Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Define one or more environments to run tests against. Each provides a baseUrl and a set of variables available to tests as env.*.
momentic.config.yaml
environments:
  - name: dev
    baseUrl: https://dev.example.com
    envVariables:
      USERNAME: devUser
      PASSWORD: devPassword
  - name: staging
    baseUrl: https://staging.example.com
    envVariables:
      USERNAME: stagingUser
      PASSWORD: stagingPassword
  - name: production
    baseUrl: https://www.example.com
    envVariables:
      USERNAME: prodUser
      PASSWORD: prodPassword
For details on how Momentic resolves variables at runtime, see Environment variables.

Per-environment options

environments[].name
string
Name of the environment. Selected at runtime via --env <name> and exposed to tests as env.ENV_NAME.
momentic.config.yaml
environments:
  - name: dev
environments[].baseUrl
string
Starting URL for tests in this environment. Exposed as env.BASE_URL.
momentic.config.yaml
environments:
  - name: dev
    baseUrl: https://dev.example.com
environments[].envVariables
Record<string, string | { fromFile: string; json?: boolean }>
Key-value pairs available to tests as env.VARIABLE_NAME. Values may reference shell variables via dotenvx interpolation, but cannot reference other variables defined in the same envVariables block.
momentic.config.yaml
environments:
  - name: dev
    envVariables:
      USERNAME: devUser
      API_KEY: ${VAR_FROM_SHELL:-default_value}
Use the fromFile form to load values from a JSON file:
momentic.config.yaml
environments:
  - name: dev
    envVariables:
      VAR_FROM_FILE:
        fromFile: package.json
        json: true
environments[].inheritFromShell
boolean
Include every variable from the enclosing shell at runtime. Default: false.
momentic.config.yaml
environments:
  - name: dev
    inheritFromShell: true
environments[].envFile
string
Path to a .env-format file to load. Each line is a KEY=VALUE pair; values become env.VARIABLE_NAME.
momentic.config.yaml
environments:
  - name: dev
    envFile: .dev.env
environments[].browser.proxy
{ server: string; username?: string; password?: string }
HTTP proxy configuration scoped to this environment. server must include the protocol (http:// or https://), host, and port.
momentic.config.yaml
environments:
  - name: dev
    browser:
      proxy:
        server: http://proxy.internal.example.com:3128
        username: my-proxy-user
        password: my-proxy-password