﻿---
title: stack kb workflows post-workflows-step-test cli command
description: Test a workflow step Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4089/reference/elastic-cli/cli/stack/kb/workflows/post-workflows-step-test
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb workflows post-workflows-step-test cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb workflows post-workflows-step-test \
  --context-override <context-override> \
  --step-id <step-id> \
  --workflow-yaml <workflow-yaml> \
  [options]
```

Test a workflow step
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--context-override string required">
    Context overrides for the step execution.
  </definition>
  <definition term="--step-id string required">
    ID of the step to test.
  </definition>
  <definition term="--workflow-yaml string required">
    YAML definition of the workflow containing the step.
  </definition>
  <definition term="--execution-context string">
    Execution context for the step execution.
  </definition>
  <definition term="--workflow-id string">
    ID of the workflow containing the step.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>