Understand mock data for step testing

Mock data is sample output that you provide for predecessor steps during a test run. Instead of executing a predecessor step, the system returns the mock data you define. The step behaves as if it ran and produced that output.

Mock data enables you to:

  • Test steps in isolation: Provide controlled input to a target step without depending on external services, APIs, or infrastructure that predecessor steps require.
  • Simulate edge cases: Define mock output that represents error conditions, empty responses, or unusual data shapes that are difficult to reproduce with live upstream steps.
  • Speed up iteration: Skip time-consuming predecessor steps and focus on validating the specific step you are developing.

When you set mock data, you select individual predecessor steps and provide mock output for each one. You can set different mock data for different predecessors, or apply the same mock output to all of them. Steps that received mock data display a Mock data pinned badge on the workflow canvas. This badge identifies which steps used simulated output during the test run.

If a predecessor step has output from a previous run, the mock data editor pre-populates with that output. You can edit the pre-populated values before pinning them.

Mock data must follow the JSON output structure that the predecessor step produces. For example, if a predecessor step returns a list of hosts, the mock data must include that structure. Otherwise, template expressions in the target step do not resolve correctly.