> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frayme.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing workflows

> Pin a fixture, run the graph end-to-end without writing decisions, diff against the production run.

The Workflow Editor ships with a built-in test panel. Use it to validate a draft against a known input before promoting to active.

## Three test modes

<Tabs>
  <Tab title="Single fixture">
    Paste one input payload. The engine runs the graph end-to-end and shows per-node output in the right pane. No decision is committed.
  </Tab>

  <Tab title="Re-run history">
    Pick a recent run from the workflow's history. The original input is replayed against the draft graph. The test pane diffs the new path against the historical path — same nodes? different branches? new errors?
  </Tab>

  <Tab title="Demo scenarios">
    Each workflow can declare named demo scenarios on its input node. The test pane reads them and surfaces a button per scenario, pre-filling the fixture.
  </Tab>
</Tabs>

## What the test pane shows

Per node:

* **Status** — `completed` / `skipped` / `errored` / `timed_out`.
* **Elapsed** — milliseconds.
* **Input** — the run-context slice the node consumed.
* **Output** — what it wrote back.

Per run:

* **Path** — sequence of node ids the engine traversed.
* **Terminal output** — the final state.
* **Decision payload** — what *would have* been written if this weren't a test run.

## Mocking vendor responses

For workflows that talk to expensive or slow vendors (Crystal, BigDataCorp), the test pane supports a `mocks` map:

```jsonc theme={null}
{
  "mocks": {
    "<node-id>": {
      "output": {
        "sanctions_hit": false,
        "pep_hit": false,
        "match_score": 0,
        "risk_level": "low"
      }
    }
  }
}
```

The engine replaces the node's actual vendor call with the mock. Useful for testing the post-vendor branches without burning quota, or for reproducing a specific vendor response while iterating on downstream logic.
