# geni workflow test (/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 `{}`.         |
| `--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).
