Skip to navigation

Simulations: mock your code tools

A simulation can now answer the requests a code tool sends, from the test case. The code tool’s own code still runs, so a test covers the code and the Playbook around it. A mocked code tool sends no request to your system.

What changes

Each code tool now has a Mock in simulations setting in place of Block in simulations.

  • A mocked code tool is answered from the test case. The simulation answers each request the code sends from the External systems field. The code reads each answer as it reads a real response.
  • A code tool that was blocked is now mocked. Before, a run failed when it reached a blocked code tool. Now the run is graded when the External systems field describes the requests. A request that neither the field nor the code tool’s API traffic profile describes still fails the run.
  • Every other code tool stays Live. A Live code tool sends real requests, as before.
  • Set simulation mode on the Tools page offers Mock for code tools, and a mocked code tool shows Mocked there.

MCP tools and HTTP Request blocks keep Block in simulations.

See Mock a code tool.