Writing tests
REST Assured is a Java DSL for testing REST services. It sends GET, POST, PUT, PATCH, DELETE, OPTIONS and HEAD requests and checks the responses. These pages go through it topic by topic. If you’re new to REST Assured, start with path engines and static imports and then the examples.
- Path engines and static imports: Pick a path engine and the static imports your tests need.
- Examples: JSON, XML and more complex parsing and validation, by example.
- Getting response data: Extract values, headers, cookies and status from a response.
- Specifying request data: Parameters, headers, cookies, content type and body of a request.
- Verifying response data: Check the body, status, headers, cookies and response time.
- JSON Schema validation: Check that a JSON response matches a JSON Schema.
- Authentication: Basic, digest, form, OAuth and custom authentication, and CSRF.
- Multi-part form data: Upload files and other data as multi-part form data.
- Object mapping: Serialize and deserialize Java objects with Jackson, Gson, JSON-B or JAXB.
- Parsers and defaults: Custom and default parsers, and default values for every request.
- Specification re-use: Reuse request and response specifications across tests.
- Parallel tests and RestAssuredClient: Run tests in parallel, and send requests through a RestAssuredClient.
- Filters: Inspect and change requests and responses with filters.
- Logging: Log requests and responses, always or when a check fails.
- Root path and path arguments: Shorten paths with a root path and path arguments.
- Sessions: Keep a session across requests.
- Redirects: Which redirects are followed, testing the redirect itself, and the limits that stop a loop.
- SSL: Test HTTPS services, with or without valid certificates.
- URL encoding: How REST Assured encodes URLs, and how to turn it off.
- Proxy: Send requests through a proxy.
- Detailed configuration: Every configuration option REST Assured has.
For REST Assured 1.9.0 and earlier, see the legacy documentation.

