Back to rankings

rest-assured/rest-assured

Java

Java DSL for easy testing of REST services

restrest-apijavagroovytest-automationtestjsonxmlhttpkotlin
Star Growth
Stars
7.1k
Forks
1.9k
Weekly Growth
Issues
566
2k4k6k
Apr 2011May 2016Jun 2021Jul 2026
ArtifactsMavengit clone https://github.com/rest-assured/rest-assured.git
README

REST Assured

Build Status Maven Central

Testing and validation of REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of using these languages into the Java domain.

News

  • 2026-07-10: REST Assured 6.0.1 is released. The Spring modules now target Spring 7 and no longer pull their own Spring version onto your classpath, so they work on Spring Boot 4 without manual exclusions. It also rounds out Jackson 3 support and fixes a few bugs. See change log for more details.
  • 2026-01-16: REST Assured 5.5.7 is released with backported support for Spring framework 7 MockMvc support. See change log for more details.
  • 2025-12-12: REST Assured 6.0.0 is released. It raises the baseline to Java 17+, upgrades to Groovy 5, adds Spring 7 + Jackson 3 support (and bumps minimum versions for Spring/Yasson/Johnzon). See release notes and change log for more details. more details.

Older News

Examples

Here's an example of how to make a GET request and validate the JSON or XML response:

get("/lotto").then().assertThat().body("lotto.lottoId", equalTo(5));

Get and verify all winner ids:

get("/lotto").then().assertThat().body("lotto.winners.winnerId", hasItems(23, 54));

Using parameters:

given().
    param("key1", "value1").
    param("key2", "value2").
when().
    post("/somewhere").
then().
    body(containsString("OK"));

Using X-Path (XML only):

given().
    params("firstName", "John", "lastName", "Doe").
when().
    post("/greetMe").
then().
    body(hasXPath("/greeting/firstName[text()='John']")).

Need authentication? REST Assured provides several authentication mechanisms:

given().auth().basic(username, password).when().get("/secured").then().statusCode(200);

Getting and parsing a response body:

// Example with JsonPath
String json = get("/lotto").asString();
List<String> winnerIds = from(json).get("lotto.winners.winnerId");
    
// Example with XmlPath
String xml = post("/shopping").andReturn().body().asString();
Node category = from(xml).get("shopping.category[0]");

REST Assured supports any HTTP method but has explicit support for POST, GET, PUT, DELETE, OPTIONS, PATCH and HEAD and includes specifying and validating e.g. parameters, headers, cookies and body easily.

Documentation

Support and discussion

Join the mailing list at our Google group.

Buy Me A Coffee

Related repositories
goldbergyoni/nodebestpractices

✅ The Node.js best practices list (July 2026)

DockerfileCreative Commons Attribution Share Alike 4.0 Internationalnodejsjavascript
twitter.com/nodepractices/
105.4k10.7k
fastapi/fastapi

FastAPI framework, high performance, easy to learn, fast to code, ready for production

PythonPyPIMIT Licensepythonjson
fastapi.tiangolo.com
100.8k9.7k
hoppscotch/hoppscotch

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

TypeScriptnpmMIT Licenseapiapi-client
hoppscotch.io
79.8k6k
typicode/json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)

JavaScriptnpmMIT Licenseapifake
75.7k7.3k
strapi/strapi

🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable, and developer-first.

TypeScriptnpmOtherstrapinodejs
strapi.io
72.7k9.8k
TanStack/query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

TypeScriptnpmMIT Licensereacthooks
tanstack.com/query
50k4k
bigskysoftware/htmx

</> htmx - high power tools for HTML

JavaScriptnpmOtherhtmljavascript
htmx.org
48.6k1.6k
httpie/cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.

PythonPyPIBSD 3-Clause "New" or "Revised" Licensehttpcli
httpie.io
38.3k4k
OAI/OpenAPI-Specification

The OpenAPI Specification Repository

MarkdownApache License 2.0openapiopenapi-specification
openapis.org
31.1k9.2k
encode/django-rest-framework

Web APIs for Django. 🎸

PythonPyPIOtherpythondjango
django-rest-framework.org
30.1k7.1k
swagger-api/swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

JavaScriptnpmApache License 2.0swaggerswagger-ui
swagger.io
28.9k9.3k
PostgREST/postgrest

REST API for any Postgres database

HaskellMIT Licensehaskelldatabase
postgrest.org
27.5k1.2k