Setup
You need Python 3.10 or newer and a running Docker environment. Install the package:Testing handlers
If you have a service as follows:create_test_harness and the typed asynchronous ingress client:
create_test_harness starts the application and Restate Server, registers the application, and stops both when the context exits. The returned harness provides:
harness.client: A typed asynchronous client for invoking Services, Virtual Objects, and Workflowsharness.ingress_url: The HTTP ingress URL for raw HTTP testsharness.admin_api_url: The Admin API URL for deployment and introspection assertions
Testing options
Use the harness options to exercise failure and replay behavior:
Use
always_replay=True for tests to find non-determinism bugs. Use disable_retries=True in focused failure tests where you need the first retryable failure to be observable immediately.