software · Q179
REST Assured
Open-source Java DSL for HTTP API requests and response validation.
Overview
REST Assured is an open-source Java library for exercising HTTP services and validating their responses. Its request-and-assertion DSL supports common HTTP methods, authentication, parameters, headers, cookies and JSON or XML response checks within code-based test suites.[2]
Code-based request tests
Developers build requests and attach response assertions in Java, using matchers to check values or response structure. Results can be extracted for later steps or parsed as JSON and XML. This fits an existing Java testing workflow: tests live with application source and use the project's build and test infrastructure rather than a standalone visual collection editor.[2]
Modules and dependency management
The main artifact includes JsonPath and XmlPath, which are also available separately. JSON Schema validation uses another module. Spring MockMvc and WebTestClient integrations support controller-level testing through related APIs, while optional Kotlin and Scala support adapts the developer experience. These choices affect dependencies and the kind of system being exercised; a controller test is not automatically the same as an external HTTP deployment test.[3]
Version and assertion compatibility
The 6.x line raises the Java baseline to 17 and changes Groovy, Spring and JSON-mapping dependencies. The 6.0.1 notes say Spring modules target Spring 7 without imposing their own Spring version on the classpath. Separately, REST Assured's JsonPath uses Groovy GPath notation rather than Jayway JSONPath. Expressions copied from another tool may therefore need translation even when both are described as JSON-path assertions.[2][4]
Response-time checks
The library can measure and assert response duration, but its documentation warns that meaningful measurements require a warmed-up JVM. The observed duration includes the HTTP round trip and library processing, so it only loosely reflects server processing time. Such assertions can flag regressions in a controlled suite without replacing a dedicated load model or server-side performance analysis.[4]
License and operation
REST Assured is distributed under Apache License 2.0 and incorporated as a test dependency through tools such as Maven or Gradle. The library does not require a proprietary test-execution subscription. The adopting team still supplies its Java runtime, runner, test data and authorized endpoints, and maintains compatibility among the project's dependencies.[1][3]
Substitution assessment
REST Assured can substitute for Karate for supported HTTP API assertions when a Java library is a better fit than feature-file syntax. Migrating means recreating scenarios and fixtures in code and translating response expressions. This assessment does not extend to Karate's browser automation, mock-server or performance-integration features. No test suite was built or executed.[2][4][5]
Capabilities & limitations
Java HTTP assertions
supportedLibrary DSL configures requests and validates response values, headers and status.[2]
Code-based HTTP API regression testing · Java 17+ for 6.x, Maven/Gradle test projects · Version, plan and platform requirements apply
1 source · check evidence
Java HTTP assertions and 6.x compatibility
vendor · checked 2026-10-07JSONPath expression interchange
limitedThe JsonPath API uses Groovy GPath rather than Jayway JSONPath syntax.[4]
Code-based HTTP API regression testing · Java 17+ for 6.x, Maven/Gradle test projects · Version, plan and platform requirements apply
1 source · check evidence
Groovy GPath versus Jayway JSONPath; response timing boundaries
vendor · checked 2026-10-07Server-only duration measurement
limitedTiming includes network and client processing and requires JVM warmup for meaningful comparison.[4]
Code-based HTTP API regression testing · Java 17+ for 6.x, Maven/Gradle test projects · Version, plan and platform requirements apply
1 source · check evidence
Groovy GPath versus Jayway JSONPath; response timing boundaries
vendor · checked 2026-10-07Can substitute for
These are products or services this entry can replace. Check the task and limitations for each comparison.
Karate for Code-based HTTP API regression testing
limitedCan replace supported HTTP assertions in Java test suites; feature-file scenarios and fixtures require rewriting and broader UI/mock capabilities are outside this assessment.[2][5]
Java 17+ for 6.x, Maven/Gradle test projects · Version, plan and platform requirements apply
References
- REST Assured license
Apache License 2.0
vendor · retrieved 2026-10-07 - REST Assured README
Java HTTP assertions and 6.x compatibility
vendor · retrieved 2026-10-07 - REST Assured setup and modules
Maven/Gradle dependencies, schema validator and Spring test modules
vendor · retrieved 2026-10-07 - REST Assured usage guide
Groovy GPath versus Jayway JSONPath; response timing boundaries
vendor · retrieved 2026-10-07 - Karate documentation overview
Feature syntax, HTTP assertions and execution choices
vendor · retrieved 2026-10-07
Discussion & disputes
Ask about unclear claims or explain a concern with supporting sources. If you have a specific fix, suggest a correction.
No discussion yet.
Revision history
Open a revision to read an earlier version of this article.
| Revision | Timestamp | Edit summary |
|---|---|---|
| 163 | 2026-10-10 12:18:45 | /* wbeditentity-create-item:0| */ sf:21583958-5910-4da3-b259-525219faea65:v1 | Add REST Assured with cited product identity, workflow and portability boundaries; documentation research only. | attribution: /proposals/21583958-5910-4da3-b259-525219faea65 |