> ## 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.

# Run tests against multiple inputs

> Parameterize a test and drive it from a CSV to run the same flow against different data.

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.

```yaml inputs-test.test.yaml theme={null}
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:

```yaml theme={null}
parameters:
  - name: TENANT
    default:
      string: acme
```

## 2. Create a CSV

The first row is the header (parameter names). Each subsequent row is one run.

```csv inputs.csv theme={null}
USERNAME,PASSWORD
alice@example.com,hunter2
bob@example.com,correcthorse
```

## 3. Run it

```bash theme={null}
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`.

## Related

* [Variables](/core-concepts/variables)
* [`momentic run`](/cli-reference/momentic/commands/run)
