# Test cases

> Runs the flow on each row of a table of test cases, in test mode, to see how well it does before and after a change.

Source: https://docs.go-lumen.ai/de/reference/triggers/evaluation

## Auf einen Blick

| Eigenschaft | Wert |
| --- | --- |
| **Trigger name** | `evaluation` |
| **Resource** | ClusterTrigger (`lumen.ai/v1alpha1`) |
| **Source** | manual |
| **Needs a connection** | no |
| **Produces** | `email`, `file` |
| **Emits** | item |
| **Installation must provide** | nothing |

The trigger goes under `spec.triggers` of a Flow. Its outputs are referenced as `<triggerId>.<field>`. A trigger can also carry a `when` condition ("Start only when") and `disabled: true`.

## Ausgaben

Ein späterer Knoten verweist auf eine Ausgabe als `{nodeId.field}` in einem Text oder als `nodeId.field` in einer Bedingung.

| Ausgabe | Typ |
| --- | --- |
| `from` | string |
| `to` | string |
| `subject` | string |
| `body` | string |
| `attachments` | number |

## Einstellungen

Wird unter `config:` im Auslöser des Flows gesetzt.

| Einstellung | Typ | Standardwert | Beschreibung |
| --- | --- | --- | --- |
| `dataset` (erforderlich) | string |  | Dataset is the table (Sheet) of test cases, one row per case. The columns from, to, cc, subject, body and attachments make the trigger's email; every column is also run.case.<column> for the score step. (minLength 1; maxLength 253) |
| `repeat` | integer | `1` | Repeat runs each case that many times, to see how steady the AI is. (minimum 1; maximum 10) |
| `maxRows` | integer | `50` | MaxRows bounds the cases one evaluation runs. (minimum 1; maximum 200) |
| `minPassRate` | number |  | MinPassRate is the share of runs that must pass for the evaluation to pass, from 0 to 1. Unset is 1: every run. (minimum 0; maximum 1) |
| `maxTokensPerCase` | integer |  | MaxTokensPerCase fails a run whose model tokens (input and output, every step) pass it, however well it scored. Unset is no ceiling. (minimum 1) |
| `maxCreditsPerCase` | number |  | MaxCreditsPerCase fails a run that costs more credits than this. Unset is no ceiling. (minimum 0) |
| `maxConcurrent` | integer | `4` | MaxConcurrent is how many test runs an evaluation starts at once; the others wait unstarted, in order, and each run that ends starts the next. Unset is 4. (minimum 1; maximum 50) |
| `modelClass` | string |  | ModelClass is the ClusterModelClass the flow's AI steps run on in a test run. Unset is the workspace's test model. (maxLength 253) |
| `approvals` | list of object |  | Approvals answer the flow's approval steps in a test run from a column of the case: approve or reject, yes or no, or a JSON object of the form's answers. An approval with none is answered by its column "approve" when the table has one. (maxItems 20) |
| `approvals[].node` (erforderlich) | string |  | Approval step (minLength 1; maxLength 63) |
| `approvals[].column` (erforderlich) | string |  | Column (minLength 1; maxLength 63) |

Das vollständige JSON Schema dieser Einstellungen: [evaluation.schema.json](https://docs.go-lumen.ai/schemas/triggers/evaluation.schema.json).
