Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Fastapi | 58,683 | 138 | 1,143 | 9 hours ago | 147 | May 14, 2022 | 517 | mit | Python | |
FastAPI framework, high performance, easy to learn, fast to code, ready for production | ||||||||||
Httpie | 27,856 | 1,645 | 42 | 11 days ago | 55 | May 06, 2022 | 146 | bsd-3-clause | Python | |
🥧 HTTPie for Terminal — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. | ||||||||||
Ky | 9,846 | 875 | 260 | 19 days ago | 53 | September 03, 2022 | 48 | mit | TypeScript | |
🌳 Tiny & elegant JavaScript HTTP client based on the browser Fetch API | ||||||||||
Api Platform | 7,919 | 4 days ago | 37 | February 12, 2018 | 559 | mit | TypeScript | |||
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time. | ||||||||||
Rest Assured | 6,349 | 7,364 | 395 | 2 months ago | 29 | September 09, 2022 | 503 | apache-2.0 | Java | |
Java DSL for easy testing of REST services | ||||||||||
Wiremock | 5,577 | 1,626 | 752 | 4 days ago | 104 | September 10, 2020 | 311 | apache-2.0 | Java | |
A tool for mocking HTTP services | ||||||||||
Kemal | 3,485 | 2 months ago | 15 | mit | Crystal | |||||
Fast, Effective, Simple Web Framework | ||||||||||
Php Curl Class | 3,152 | 690 | 352 | a day ago | 66 | September 24, 2022 | 3 | unlicense | PHP | |
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs | ||||||||||
Flask Restplus | 2,558 | 863 | 119 | 2 years ago | 35 | August 12, 2019 | 380 | other | Python | |
Fully featured framework for fast, easy and documented API development with Flask | ||||||||||
Httpexpect | 2,202 | 70 | 110 | 2 days ago | 23 | July 20, 2021 | 34 | mit | Go | |
End-to-end HTTP and REST API testing for Go. |
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.
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.
Join the mailing list at our Google group.