Expand description
Contains helpers for Gotham applications to use during testing.
See the TestServer
and AsyncTestServer
types for example usage.
Structs§
- An
AsyncTestServer
, that can be used for testing requests against a server in asynchronous contexts. TheAsyncTestServer
runs in the runtime where it is created and anAsyncTestClient
can be created to make asynchronous requests to it. TestConnect
represents the connection between a test client and theTestServer
instance that created it. This type should never be used directly.- The
TestServer
type, which is used as a harness when writing test cases for Hyper services (which Gotham’sRouter
is). An instance ofTestServer
is run asynchronously within the current thread, and is only accessible by a client returned from theTestServer
.