# geni workflow test

> Run a cloud test execution of the published version and wait for the result.

Source: https://docs.generalinput.com/cli/resource/workflow/test



```sh
geni workflow test [id] [flags]
```

Runs a real test execution of the **published** version in the cloud, with an optional trigger payload, and waits for the result — printing the status, output, and logs. Test executions run even when the workflow is disabled, so you can verify before enabling it.

<Callout type="warn" title="Publish first">
  `test` runs the published bundle, not your local edits.
  [`publish`](/cli/resource/publish) before testing, or you'll be running the
  previous version.
</Callout>

## Synopsis [#synopsis]

```sh
geni workflow test
geni workflow test --payload '{"days":7}'
geni workflow test wf_01HX --timeout 300 --json
```

| Arg / Flag                      | Notes                                                                                     |
| ------------------------------- | ----------------------------------------------------------------------------------------- |
| `[id]`                          | Workflow id. Omit to use the marker in `--dir`.                                           |
| `--payload <json>`              | Trigger payload as a JSON object. Defaults to `{}`.                                       |
| `--trigger <key>`               | Trigger node id from `workflow.json`; automatically selected only when unambiguous.       |
| `--acknowledge-schema-mismatch` | Proceed after reviewing a warning that the payload differs from the poll provider schema. |
| `--timeout <seconds>`           | How long to wait for the run before giving up. Default 180.                               |
| `--dir <path>`                  | Resource directory. Defaults to cwd.                                                      |
| `--json`                        | Machine-readable output (final execution + logs).                                         |

If the workflow isn't ready (an unwired credential or unset schedule), the run blockers are printed and nothing is scheduled — fix them with [`config set`](/cli/resource/config) and retry. To test a file-type input, stage the file first with [`stage-input`](/cli/resource/workflow/stage-input).

The command exits nonzero if the run fails. On timeout, the cloud execution keeps running; check [`geni workflow executions`](/cli/resource/workflow/executions).

A test preserves the selected trigger as `context.trigger`. If several triggers could apply, choose `--trigger`; unknown keys are rejected. Poll payloads are checked against the selected provider schema unless the workflow has a filter that transforms the input. Preview that gate with [`preview-filter`](/cli/resource/workflow/preview-filter), then test the returned input.

A run that pauses at `awaiting_input` returns successfully; use [`pending-input` and `resume`](/cli/resource/workflow/control) to answer its questions and finish it.
