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]
Contents 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]
Also included: 3 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.