Expand description
Various helpers for Actix applications to use during testing.
§Initializing A Test Service
§Off-The-Shelf Test Services
§Calling Test Service
TestRequestcall_servicetry_call_servicecall_and_read_bodycall_and_read_body_jsontry_call_and_read_body_json
§Reading Response Payloads
Structs§
- Test
Buffer  - Async I/O test buffer.
 - Test
Request  - Test 
Requestbuilder. 
Functions§
- call_
and_ read_ body  - Helper function that returns a response body of a TestRequest
 - call_
and_ read_ body_ json  - Helper function that returns a deserialized response body of a TestRequest
 - call_
service  - Calls service and waits for response future completion.
 - init_
service  - Initialize service from application builder instance.
 - ok_
service  - Creates service that always responds with 
200 OKand no body. - read_
body  - Helper function that returns a response body of a ServiceResponse.
 - read_
body_ json  - Helper function that returns a deserialized response body of a ServiceResponse.
 - status_
service  - Creates service that always responds with given status code and no body.
 - try_
call_ and_ read_ body_ json  - Fallible version of 
call_and_read_body_jsonthat allows testing service call errors. - try_
call_ service  - Fallible version of 
call_servicethat allows testing response completion errors. - try_
read_ body  - Fallible version of 
read_bodythat allows testing MessageBody reading errors. - try_
read_ body_ json  - Fallible version of 
read_body_jsonthat allows testing response deserialization errors.