Skip to main content
Test your actor walks through these.

SimulatedChain

SimulatedChain(actor) from cowboy_sdk.testing runs one actor’s handlers in memory, from empty state.

mock_host

cowboy_sdk.mock_host is the in-memory stand-in for Cowboy that SimulatedChain runs on.

Calls to other actors

When a handler calls another actor with call(...), answer it with a CallMock. This test needs no second actor:
Output
when(...) chooses which calls to match, and respond(...) gives the encoded answer. calls records every call.

Stubs

Every runner call a handler makes needs an answer. Without one, the run ends with the handler still waiting for its job.

State and callers

cowboy run lists the rest.