Skip to main content
Run one test against many sets of inputs (login matrices, pricing tiers, locale variations) by declaring parameters and feeding them from a CSV, so you maintain a single flow instead of one test per case.

1. Declare parameters

Add a parameters key to your test file. Parameters become available as env.<NAME> inside steps.
inputs-test.test.yaml
fileType: momentic/test/v2
id: inputs-test
parameters:
  - name: USERNAME
    required: true
  - name: PASSWORD
    required: true
steps:
  - javascript: assert(env.USERNAME.length > 0)
Each entry is { name, required?, default?: { string } }. Add a default when the test should run without the parameter supplied:
parameters:
  - name: TENANT
    default:
      string: acme

2. Create a CSV

The first row is the header (parameter names). Each subsequent row is one run.
inputs.csv
USERNAME,PASSWORD
alice@example.com,hunter2
bob@example.com,correcthorse

3. Run it

npx momentic run --input-csv inputs.csv inputs-test.test.yaml
Momentic runs the test once per CSV row, substituting the column values into env.