[−][src]Module ntex::web::test
Various helpers for ntex applications to use during testing.
Structs
TestRequest | Test |
TestServer | Test server controller |
TestServerConfig | Test server configuration |
Functions
call_service | Calls service and waits for response future completion. |
config | Create default test server config |
default_service | Create service that responds with response with specified status code |
from_request | Helper method for extractors testing |
init_service | This method accepts application builder instance, and constructs service. |
load_stream | Reads response's body and combines it to a Bytes objects |
ok_service | Create service that always responds with |
read_body | Helper function that returns a response body of a WebResponse. |
read_response | Helper function that returns a response body of a TestRequest |
read_response_json | Helper function that returns a deserialized response body of a TestRequest |
respond_to | Helper method for responders testing |
server | Start test server with default configuration |
server_with | Start test server with custom configuration |