UiPath Documentation
maestro
latest
false
Wichtig :
Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Benutzerhandbuch zu Maestro

Output mocking

Output mocking lets you define a fixed output for any node during a test run, without actually executing the node's real action. This is useful for testing downstream logic when the real action is slow, expensive, or requires external dependencies that are not available during a Debug run.

How mocking works

When you enable a mock on a node, Flow skips the node's actual execution during the test run and injects the mocked output values directly. All downstream nodes receive the mocked values as if the node had run normally.

Mocks apply only during test runs. They are never active in published, production workflows.

Setting up a mock

  1. Select the node you want to mock on the canvas.
  2. In the configuration panel, open the Mock output section.
  3. Enable the mock toggle.
  4. Enter the output values you want to inject. Use valid JSON that matches the node's output schema.

Result: The node is mocked. On the next test run, Flow skips its real execution and injects your values downstream instead.

Häufige Anwendungsfälle

  • Human Task nodes — Simulate an approved or rejected response without waiting for a real approver.
  • HTTP Request nodes — Simulate a specific API response, including error responses, to test your error handling paths.
  • Agent nodes — Simulate the output of an AI agent to test how your workflow handles different agent responses.
  • Subflow nodes — Simulate the output of a child workflow to test the parent workflow in isolation.

Resetting mocks

To run a workflow with real execution, disable the mock toggle on each mocked node before running the test. Mocks are not saved as part of the published workflow definition.

Common mistakes

  • Publishing with a mock still enabled — Mocks are automatically disabled on publish, so this isn't a production risk. But if you forget to disable a mock before your final test run, you're testing against fake data, not real execution.
  • Entering mock data that doesn't match the node's output schema — If the mocked JSON doesn't match the shape the downstream nodes expect, you'll get runtime errors downstream that wouldn't happen with real data. Match the schema exactly.
  • Mocking too many nodes at once — If you mock five nodes to test the sixth, a passing test doesn't tell you much. Mock only the nodes that block you from testing the part you actually care about.

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben