
REST Assured Product Review
- Fully open source
- No commercial tier
- Maven Central artifacts
- BOM for version alignment
- Sponsored by Parkster
- No license fee
- No usage limits
- No account required
- Production-grade for free
- Released December 2010
- Started at Jayway, Sweden
- ~7.1k GitHub stars
Overview
REST Assured is a free, open-source Java DSL for testing and validating REST APIs. It brings the concise HTTP testing style of dynamic languages such as Ruby and Groovy to the JVM. Tests use a fluent given, when, then syntax that builds the request, sends it, and asserts on the response in a single method chain, and they run inside standard Java test frameworks rather than as a separate application.
The core library and its optional modules provide:
- JSON and XML response validation using GPath expressions, with JsonPath and XmlPath included
- JSON Schema validation through the json-schema-validator module
- In-process controller testing through the Spring MockMvc and Spring WebTestClient modules
- Language extensions for Kotlin and Scala
REST Assured was created by Johan Haleby in December 2010 at Jayway, and he still maintains it with other contributors. The project is sponsored by Parkster and licensed under Apache 2.0. Version 6.2.0, released in October 2026, added mutual TLS client certificate support and fixed race conditions in parallel test execution.
Key Featuresโ
Write Readable API Tests with Given, When, Then Syntaxโ
- REST Assured lets testers describe the request setup, the call, and the expected result in one readable chain, so each test reads like a short specification.
- An alternative given, expect, when style is also supported, and it reports every failed expectation at once instead of stopping at the first one.
- Optional connecting words such as "and" can be added to make longer tests easier to read without changing how they run.
Send Requests with Any HTTP Method and Parameter Typeโ
- REST Assured supports all standard HTTP methods, any custom method name, and the newer HTTP QUERY method added in version 6.1.0.
- Requests can include query parameters, form parameters, path parameters, multi-value parameters, headers, and cookies.
- Request bodies can be sent as plain text, byte arrays, or Java objects that are converted to JSON or XML automatically.
Validate JSON and XML Responses with Path Expressionsโ
- Testers can check any value inside a JSON or XML response by writing a simple path to it, instead of parsing the response by hand.
- Paths support filtering, searching, collecting, and summing values, which makes it easy to check lists and nested data.
- XML checks support namespaces and XPath, and HTML pages can also be parsed and checked.
Validate Responses Against JSON Schema, XSD, and DTDโ
- A separate module checks that a JSON response matches a JSON Schema, with support for drafts from version 03 up to 2020-12.
- XML responses can be validated against an XSD schema or a DTD.
- Schema checks catch structural changes in an API, such as a missing or renamed field, even when individual values still look correct.
Verify Status Codes, Headers, Cookies, and Response Timeโ
- Tests can check the status code, status line, headers, cookies, content type, and full response body in the same chain.
- One part of a response can be compared with another part, such as checking that a link in the body matches a header value.
- REST Assured measures how long each request takes, so tests can fail if an API responds too slowly.
Authenticate with Basic, Digest, Form, OAuth, and Client Certificatesโ
- REST Assured has built-in support for Basic, Digest, form-based, OAuth 1, and OAuth 2 authentication, so most login methods need no custom code.
- It can automatically find and send CSRF tokens, which makes it possible to test login forms protected against cross-site request forgery.
- Client certificates for mutual TLS are supported, and teams can add their own authentication schemes through custom filters.
Map Requests and Responses to Java Objectsโ
- Java objects can be sent as request bodies and responses can be read back into Java objects, so tests can reuse the same data classes as the application.
- JSON and XML mapping works with popular libraries such as Jackson, Gson, JAXB, Johnzon, and Yasson, chosen automatically from the content type.
- Responses can also be read into generic collections such as lists and maps, and teams can plug in their own mapper if needed.
Upload Files with Multipart Requestsโ
- REST Assured can upload files, byte arrays, streams, text, and Java objects in multipart requests.
- Several parts can be sent in one request, which makes it possible to test complex form submissions and file upload APIs.
Reuse Request and Response Settings Across Testsโ
- Common settings such as the base URL, headers, content type, and authentication can be defined once and shared across many tests.
- Expected results, such as a status code or required headers, can also be shared, which keeps large test suites short and consistent.
- Default values such as the base URL, port, and base path can be set globally for the whole test suite.
Extend Requests and Responses with Filtersโ
- Filters can inspect or change any request before it is sent and any response before it is checked, for example to add a header or sign a request.
- Filters can be ordered, and built-in filters handle request logging, response logging, and error logging.
Log Requests and Responses for Debuggingโ
- REST Assured can print the full request and response, or only parts such as the headers, body, or cookies.
- Logging can be turned on only when a test fails, which keeps passing test output clean while still giving full details for failures.
- Sensitive headers such as authorization tokens can be hidden in the logs.
Handle Sessions, SSL, Proxies, and Redirectsโ
- Session IDs can be captured from one response and sent with later requests automatically, which helps when testing multi-step login flows.
- SSL settings include trust stores, key stores, relaxed certificate checks for test environments, and disabling hostname checks.
- Requests can be sent through a proxy, and redirect behavior, character encoding, and compression can all be configured.
Test Spring Controllers Without a Running Serverโ
- The Spring MockMvc module tests Spring MVC controllers directly, without starting a web server, using the same readable syntax.
- The Spring WebTestClient module does the same for reactive Spring WebFlux controllers.
- The Spring modules support Spring 7 and Spring Boot 4 without extra dependency setup.
Write Tests in Kotlin and Scalaโ
- A Kotlin extensions module lets Kotlin teams write REST Assured tests in a style that suits the language.
- A Scala support module provides the same for Scala projects.
Best Selling Pointsโ
Simple API Testing for Java Teamsโ
REST Assured brings the simplicity of API testing in dynamic languages such as Ruby and Groovy into Java. Tests are short, readable, and written in the same language as the application, so Java developers do not need to learn a separate tool.
Free and Open Sourceโ
REST Assured is released under the Apache 2.0 license and is free to use, with no paid tiers or license fees. It is maintained by its creator, Johan Haleby, with help from the community and sponsorship from Parkster.
Mature and Actively Maintainedโ
The project has been developed since 2010 and still receives regular releases, including versions 6.1.0 and 6.2.0 in October 2026. Recent releases added the HTTP QUERY method, newer JSON Schema drafts, mutual TLS support, and Spring 7 support.
All Common Validations in One Libraryโ
JSON and XML path checks, JSON Schema, XSD and DTD validation, header and cookie checks, and response time checks are all available in one library. Teams do not need to combine several tools to cover these checks.
Built-in Authentication Supportโ
Basic, Digest, form, OAuth 1, OAuth 2, CSRF tokens, and client certificates are supported out of the box. This lets teams test secured APIs without writing their own authentication code.
Fast Spring Controller Testingโ
The Spring MockMvc and WebTestClient modules test Spring controllers without starting a server, which makes tests faster and easier to run. The same syntax is used for both in-process and real HTTP tests.
Clear Debugging Outputโ
Requests and responses can be logged in full or only when a test fails, and sensitive headers can be hidden. This gives teams the details they need to fix failures without cluttering passing test runs.
Kotlin and Scala Supportโ
Dedicated Kotlin and Scala modules let teams use REST Assured in their preferred JVM language. This makes it a good fit for mixed-language projects.
Supported Integrationsโ
- Maven
- Gradle
- SBT (Scala Build Tool)
- JUnit
- Hamcrest
- Spring MockMvc
- Spring WebTestClient
- Spring Framework 7
- Spring Boot 4
- Spring Security (form login)
- Jackson 2 / 3
- Gson
- JAXB
- Jakarta EE (JSON-B)
- Johnzon
- Yasson
- JSON Schema
- Scribe (OAuth 1)
- Kotlin
- Scala
Popular Customersโ
- REST Assured does not publish customer logos because it is an open-source library rather than a commercial product, but its adoption is reflected in its GitHub repository, which has about 7,100 stars and more than 1,900 forks.
Protocol and Method Coverageโ
REST Assured is built for HTTP-based APIs, and other protocols need separate libraries.
- REST
- GraphQL (over HTTP)
- SOAP (as XML)
- Custom HTTP
- GET/DELETE bodies
REST Assured is designed for testing APIs that communicate over HTTP and HTTPS.
Supported HTTP methods
- REST Assured supports all standard HTTP methods, including GET, POST, PUT, PATCH, DELETE, OPTIONS, and HEAD.
- Any custom method name can be sent, so APIs that use non-standard verbs can still be tested.
- The HTTP QUERY method is supported natively since version 6.1.0.
- A request body can be sent with any method, including GET and DELETE.
Supported request data
- Requests can include query parameters, form parameters, and path parameters, including parameters with multiple values or no value.
- Headers and cookies can be set on any request, and repeated headers can either be merged or replaced.
- Request bodies can be plain text, byte arrays, multipart content, or Java objects that are converted to JSON or XML.
- Parameter values do not have to be strings, because REST Assured converts numbers, dates, and other Java values automatically.
Content types and encoding
- The content type and character set of a request can be set explicitly, and the Content-Type header can also be left out entirely when an API requires it.
- Default character sets can be configured for both requests and responses, and JSON responses are read as UTF-8 by default.
- Responses compressed with GZIP or DEFLATE are decoded automatically.
- Automatic URL encoding can be turned off for APIs that expect query strings that are already encoded.
Response formats
- JSON and XML responses can be validated directly, and HTML pages can be parsed and checked as well.
- Responses with custom content types can be handled by registering a custom parser, or by setting a default parser for responses that do not declare a content type.
- The response body can also be read as a string, a byte array, or a stream for custom processing.
Connection behavior
- Redirects are followed automatically, and both whether to follow them and the maximum number of redirects can be configured.
- Requests can be sent through an HTTP or HTTPS proxy, including proxies that require Basic authentication.
- When a redirect goes to a different host, REST Assured no longer sends the Authorization and Cookie headers, which prevents credentials from leaking to another server.
Other API styles
- GraphQL APIs can be tested by sending the query as a JSON body in an HTTP POST request, although REST Assured has no dedicated GraphQL helpers.
- SOAP APIs can be tested by sending the SOAP envelope as an XML body and checking the XML response, although there is no support for generating requests from a WSDL.
Supported Authenticationโ
Built-in support covers the most common HTTP authentication methods, and custom schemes can be added through filters.
- Basic (preemptive)
- Basic (challenged)
- Digest
- Form login
- CSRF tokens
- OAuth 1
- OAuth 2
- Client Certificate / mTLS
- Custom (AuthFilter)
REST Assured includes built-in support for the following authentication methods:
- Basic authentication: Credentials can be sent preemptively with the first request, or only after the server asks for them.
- Digest authentication: REST Assured responds to the server's challenge with a hashed password, so the password is never sent in plain text.
- Form authentication: REST Assured can log in through an HTML login form, either by detecting the form automatically or by using the form details that the tester provides. A ready-made setting is available for Spring Security login forms.
- CSRF protection: REST Assured can find the CSRF token in a form field or meta tag and send it with the login request, which makes it possible to test forms protected against cross-site request forgery.
- OAuth 1: OAuth 1 requests can be signed automatically when the Scribe library is added to the project.
- OAuth 2: An OAuth 2 access token can be sent in the Authorization header or as a query parameter.
- Client certificates: Mutual TLS is supported through a key store, and since version 6.2.0 the key store works even when no trust store is configured.
- Custom authentication: Teams can add their own authentication scheme by writing a custom authentication filter.
Authentication can be set for a single request, shared through a reusable request specification, or applied globally to every test. REST Assured does not include built-in NTLM authentication.
Mocking and Service Virtualizationโ
- REST Assured does not include a mock server, because it is a client library that sends requests to an API and checks the responses.
- Teams that need to simulate an API usually run a separate mocking tool alongside REST Assured, such as WireMock for stubbing HTTP responses, MockServer for setting up expected requests and responses, or Hoverfly for capturing and replaying real traffic.
- The Spring MockMvc and Spring WebTestClient modules let REST Assured call Spring controllers directly inside the test, without starting a web server or sending real network traffic.
- These Spring modules are a way to test controllers in isolation rather than a mock server, and any services behind the controller still need to be mocked with a library such as Mockito.
Reportingโ
REST Assured has no reporter of its own, so test results come from the test framework and reporting tools it runs with.
Supported Formats
Produced by the test framework or by third-party reporting tools.
- JUnit XMLCreated by the Java test framework
- Allure HTMLThrough the Allure REST Assured integration
- Extent ReportsThrough a community plugin
- Native HTMLNo built-in HTML report
- REST Assured does not create test reports itself, because it is a library that runs inside a Java test framework such as JUnit, which records whether each test passed or failed.
- Test results are saved in the standard JUnit XML format by the Maven or Gradle build, so CI servers can read them and display the results.
- The Allure Report project provides an official REST Assured integration that attaches the full request and response of every API call to the Allure report, and it works with Allure's JUnit, Cucumber-JVM, and Spock adapters.
- The Allure integration lets teams customize how requests and responses appear in the report, including their names and layout.
- A community plugin can produce Extent Reports in HTML and PDF formats with the request and response details of each REST Assured test.
- ReportPortal provides a REST Assured logger that sends request and response details to ReportPortal, and it can hide sensitive data such as authorization headers.
- REST Assured's own logging can print the full request and response to the test output, either for every test or only when a test fails, which helps teams debug failures without a separate reporting tool.
Security and Complianceโ
Where Your Data Is Storedโ
- REST Assured is an open-source library that runs entirely inside a team's own test code, so there is no hosted service and no test data is sent to the REST Assured project.
- Because there is no service, certifications such as SOC 2 and ISO 27001 do not apply, and security depends on how each team stores its own credentials and test data.
Secure Connectionsโ
- HTTPS works by default for servers with valid certificates.
- Trust stores and key stores can be loaded from files or Java key store objects, either for a single request or for the whole test suite.
- Mutual TLS is supported through client certificates, and since version 6.2.0 a client certificate works even when no trust store is set.
- For test environments with self-signed certificates, certificate checks and hostname checks can be relaxed, and this should not be used against production systems.
Protecting Credentialsโ
- When a request is redirected to a different host, REST Assured no longer sends the Authorization and Cookie headers, which prevents credentials from leaking to another server. This was added in version 6.1.0.
- Sensitive headers such as authorization tokens can be hidden in request and response logs, where they appear as a masked value instead of the real token.
- Default authentication can be cleared at any time by resetting REST Assured's global settings, which helps prevent credentials from carrying over between tests.
Sessions and Proxiesโ
- Session IDs can be captured from a response and reused in later requests, which supports testing login flows that rely on server sessions.
- Requests can be sent through HTTP or HTTPS proxies, including proxies that require Basic authentication.
Software Supply Chainโ
- REST Assured is published on Maven Central under the Apache 2.0 license.
- Version 6.2.0 upgraded the Scala support module to a Scala version that fixes the known vulnerability CVE-2022-36944.
Pricingโ
Free and open source under Apache License 2.0. No commercial tier, no paid support, no enterprise SKU. Sponsorship by Parkster funds maintenance.
| Plan | Price | Includes |
|---|---|---|
| Open Source | $0 forever | Full library, all modules, all features, community support |
- No paid tiers, no per-user pricing, no enterprise add-ons.
- Production-grade for free. Used in 7,000+ GitHub stars worth of public projects.
Download & Platform Availabilityโ
REST Assured is a Java library rather than a standalone application, so it is added to a project as a test dependency. The latest version is 6.2.0, released in October 2026.
1. Build Tool Dependenciesโ
- REST Assured is available as a dependency for Maven and Gradle projects, and Scala projects can also add it through SBT (Scala Build Tool).
- Optional modules are added as separate dependencies, so teams include only the features they need.
2. Direct Downloadsโ
- For projects that do not use a build tool, each module is also offered as a ZIP file that includes the library, its source code, its documentation, and its dependencies.
- These downloads are hosted on Bintray, and versions 2.2.0 and older are available from the project's old Google Code download page.
- Snapshot builds of upcoming versions are also published for teams that want to try changes before a release.
3. Available Modulesโ
- REST Assured core, which includes JsonPath and XmlPath for reading JSON and XML responses.
- JsonPath and XmlPath, which can also be downloaded separately for parsing JSON and XML outside of API tests.
- JSON Schema Validator, for checking responses against a JSON Schema.
- Spring MockMvc and Spring WebTestClient, for testing Spring controllers, and both require the core library.
- Kotlin Extensions, for writing tests in Kotlin.
- Scala Support, for writing tests in Scala.
Awards & Recognitionโ
- REST Assured does not receive formal commercial awards, because it is a free, open-source Java library rather than a company or commercial product.
- Its recognition comes from consistent top placements in industry guides and API testing tool reviews, where it is widely treated as the standard choice for BDD-style API automation in Java.
- In the Test Guild practitioner's guide, REST Assured is recognized as the leading API automation tool for enterprise teams that work in Java.
- In the KiwiQA Best API Testing Tools report, it is featured among the top API testing tools alongside platforms such as Postman, because its domain-specific language scales well to large test suites.
Limitationsโ
- REST Assured is a Java library, so tests must be written in Java, Kotlin, or Scala, and teams working in other languages cannot use it.
- Testers need programming skills to write and maintain tests, which makes it harder for non-developers to adopt than tools with a graphical interface or a plain-text test syntax such as Postman or Karate.
- Tests need more setup code, such as imports, test classes, and annotations, than tools such as Karate that use a plain-text test format.
- REST Assured does not create test reports itself, so teams rely on JUnit XML output or on separate tools such as Allure for readable reports.
- REST Assured has no built-in mock server, so teams that need to simulate APIs must add a separate tool such as WireMock.
- REST Assured has no parallel test runner of its own, so parallel execution depends on the test framework or build tool, and global settings must be handled carefully when tests run in parallel.
- GraphQL and SOAP can only be tested as plain HTTP requests, because REST Assured has no dedicated GraphQL or SOAP support.
- REST Assured does not support gRPC, WebSocket, Server-Sent Events, or message queues, and its documentation does not mention HTTP/2 or HTTP/3.
- Direct ZIP downloads are hosted on Bintray, which has been shut down, so projects without Maven or Gradle may find it harder to get the library.
Best Fit Scenariosโ
- Java, Kotlin, and Scala development teams that want to write API tests in the same language and project as their application code.
- Spring Boot teams that want to test controllers quickly without starting a server, using the Spring MockMvc and WebTestClient modules.
- Teams that already run JUnit with Maven or Gradle and want to add API tests to their existing build and CI pipeline.
- Teams that want to reuse their application's data classes and JSON or XML mappers in their tests, so request and response models stay in sync.
- Teams that test secured APIs and need built-in support for Basic, Digest, form, OAuth, CSRF, and mutual TLS authentication.
- Teams that want to check API responses against a JSON Schema, an XSD, or a DTD as part of their automated tests.
- REST Assured is a weaker fit for teams outside the Java ecosystem, for manual or exploratory testing, for non-developers who prefer a visual tool, and for APIs that use protocols other than HTTP.