{"schemaVersion":"1.0","record":{"label":"REST Assured","description":"Open-source Java DSL for HTTP API requests and response validation.","aliases":[],"kind":"software","website":"https://rest-assured.io/","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.","license":"Apache-2.0","lifecycle":"active","example":false,"features":[{"name":"Java HTTP assertions","status":"supported","detail":"Library DSL configures requests and validates response values, headers and status.","useCase":"Code-based HTTP API regression testing","platforms":["Java 17+ for 6.x","Maven/Gradle test projects"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/rest-assured/rest-assured/blob/master/README.md","locator":"Java HTTP assertions and 6.x compatibility","retrievedAt":"2026-10-07T10:53:46Z","kind":"vendor"}]},{"name":"JSONPath expression interchange","status":"limited","detail":"The JsonPath API uses Groovy GPath rather than Jayway JSONPath syntax.","useCase":"Code-based HTTP API regression testing","platforms":["Java 17+ for 6.x","Maven/Gradle test projects"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/rest-assured/rest-assured/wiki/Usage","locator":"Groovy GPath versus Jayway JSONPath; response timing boundaries","retrievedAt":"2026-10-07T10:54:35Z","kind":"vendor"}]},{"name":"Server-only duration measurement","status":"limited","detail":"Timing includes network and client processing and requires JVM warmup for meaningful comparison.","useCase":"Code-based HTTP API regression testing","platforms":["Java 17+ for 6.x","Maven/Gradle test projects"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/rest-assured/rest-assured/wiki/Usage","locator":"Groovy GPath versus Jayway JSONPath; response timing boundaries","retrievedAt":"2026-10-07T10:54:35Z","kind":"vendor"}]}],"alternatives":[],"slug":"rest-assured","draftAlternatives":[{"targetSlug":"karate","status":"limited","detail":"Can replace supported HTTP assertions in Java test suites; feature-file scenarios and fixtures require rewriting and broader UI/mock capabilities are outside this assessment.","useCase":"Code-based HTTP API regression testing","platforms":["Java 17+ for 6.x","Maven/Gradle test projects"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/rest-assured/rest-assured/blob/master/README.md","locator":"Java HTTP assertions and 6.x compatibility","retrievedAt":"2026-10-07T10:53:46Z","kind":"vendor"},{"url":"https://docs.karatelabs.io/","locator":"Feature syntax, HTTP assertions and execution choices","retrievedAt":"2026-10-07T10:54:09Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/rest-assured/rest-assured/blob/master/README.md","locator":"Java HTTP assertions and 6.x compatibility","retrievedAt":"2026-10-07T10:53:46Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/rest-assured/rest-assured/blob/master/LICENSE","locator":"Apache License 2.0","retrievedAt":"2026-10-07T10:54:50Z","id":"restassured-license","title":"REST Assured license","kind":"vendor"},{"url":"https://github.com/rest-assured/rest-assured/blob/master/README.md","locator":"Java HTTP assertions and 6.x compatibility","retrievedAt":"2026-10-07T10:53:46Z","id":"restassured-home","title":"REST Assured README","kind":"vendor"},{"url":"https://github.com/rest-assured/rest-assured/wiki/GettingStarted","locator":"Maven/Gradle dependencies, schema validator and Spring test modules","retrievedAt":"2026-10-07T10:57:20Z","id":"restassured-modules","title":"REST Assured setup and modules","kind":"vendor"},{"url":"https://github.com/rest-assured/rest-assured/wiki/Usage","locator":"Groovy GPath versus Jayway JSONPath; response timing boundaries","retrievedAt":"2026-10-07T10:54:35Z","id":"restassured-usage","title":"REST Assured usage guide","kind":"vendor"},{"url":"https://docs.karatelabs.io/","locator":"Feature syntax, HTTP assertions and execution choices","retrievedAt":"2026-10-07T10:54:09Z","id":"karate-docs","title":"Karate documentation overview","kind":"vendor"}],"overviewCitations":["restassured-home"],"licenseCitations":["restassured-license"],"sections":[{"id":"workflow","heading":"Code-based request tests","paragraphs":[{"id":"workflow-detail","content":[{"text":"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."}],"citations":["restassured-home"]}]},{"id":"modules","heading":"Modules and dependency management","paragraphs":[{"id":"modules-detail","content":[{"text":"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."}],"citations":["restassured-modules"]}]},{"id":"compatibility","heading":"Version and assertion compatibility","paragraphs":[{"id":"compatibility-detail","content":[{"text":"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."}],"citations":["restassured-home","restassured-usage"]}]},{"id":"timing","heading":"Response-time checks","paragraphs":[{"id":"timing-detail","content":[{"text":"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."}],"citations":["restassured-usage"]}]},{"id":"license","heading":"License and operation","paragraphs":[{"id":"license-detail","content":[{"text":"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."}],"citations":["restassured-license","restassured-modules"]}]},{"id":"assessment","heading":"Substitution assessment","paragraphs":[{"id":"assessment-detail","content":[{"text":"REST Assured can substitute for "},{"text":"Karate","targetSlug":"karate"},{"text":" 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."}],"citations":["restassured-home","restassured-usage","karate-docs"]}]}]},"id":"Q179","revision":163,"updatedAt":"2026-10-10T12:18:45Z","sourceUrl":"https://substitutefor.net/entities/Q179?revision=163"}}