restassured-testing
БесплатноБез исполняемых скриптовНе проверенUse whenever Java/JVM API tests need writing or fixing: loose assertions that let an empty 200 pass, slow sequential suites, or hand-rolled HTTP clients…
от testland★ 18 звёзд на GitHubОб этом скилле
restassured-testing
Overview
REST Assured is a Java DSL for HTTP API testing with a BDD-style
given().when().then() chain (restassured-readme). It runs
inside any JUnit / TestNG suite and consumes JSON, XML, and other
content types via path expressions backed by Hamcrest matchers
(restassured-usage).
This is the JVM-native counterpart to
postman-collections. Use REST
Assured when the team's primary stack is Java / Kotlin / Scala and
type-safe authoring + same-language refactoring matter.
When to use
- The project is a Maven or Gradle Java project.
- The team wants API tests in the same language as the application (refactor-safe, IDE-aware).
- Tests need to compose fluently with JUnit 5 / TestNG fixtures.
- Authentication patterns required: Basic (preemptive), OAuth2 (bearer token), API key in header - all first-class.
If the team is non-JVM, evaluate
postman-collections (JSON-driven),
tavern-testing (Python YAML), or
karate-testing (cross-platform DSL).
Install
REST Assured 6.3.0 (2026-10-23) is current; per the changelog, 6.0.0 set the "New minimum Java baseline" to 17.
Maven
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>6.3.0</version>
<scope>test</scope>
</dependency>
<!-- Optional: body(matchesJsonSchemaInClasspath(..)) -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-schema-validator</artifactId>
<version>6.3.0</version>
<scope>test</scope>
</dependency>
(Per restassured-usage.) Keep every io.rest-assured module on
the same version: with two or more modules, import
io.rest-assured:rest-assured-bom in dependencyManagement instead of
repeating the version. Spring Boot's dependency management can pin an
older REST Assured; set the rest-assured.version property to override
it.
Gradle
testImplementation(platform("io.rest-assured:rest-assured-bom:6.3.0"))
testImplementation("io.rest-assured:rest-assured")
testImplementation("io.rest-assured:json-schema-validator")
Upgrading from 5.x
Per the changelog:
- 6.0.0 raises the baselines to Java 17 and Groovy 5.x and adds Jackson 3 object mapping.
- 6.2.0 changes specification behavior. A spec from
RequestSpecBuilder.build()can no longer send a request itself (spec.when().get(..)throwsIllegalStateException; usegiven(spec)), and per usage, merging a spec "only overwrites values that the merged specification sets itself" where "Before REST Assured 6.2.0 values such as the base URI, port and authentication were reset by a merge". Re-run suites that layer several specs. - 6.3.0 adds an OpenRewrite recipe,
io.restassured.MigrateRestAssured6Deprecations, in therest-assured-openrewritemodule, that moves code off APIs deprecated in 6.x. It also publishesjson-path-gpathandxml-path-gpath, the REST Assured 7.0.0 names ofjson-pathandxml-path; switch explicitjson-pathdependencies to them before 7.0.
Authoring
Imports
The canonical static imports for fluent authoring (restassured-usage):
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;
import static io.restassured.matcher.RestAssuredMatchers.*;
These bring given(), get(), post(), etc. plus Hamcrest matchers
(equalTo, hasItems, containsString, nullValue, etc.) into
scope.
given() / when() / then() chain
The basic shape (restassured-readme):
given().
param("key1", "value1").
when().
post("/somewhere").
then().
body(containsString("OK"));
given() configures the request (params, headers, body, auth);
when() issues the HTTP verb; then() asserts the response.
Status code assertion
get("/x").then().assertThat().statusCode(200);
(Per restassured-usage.)
statusCode(int) is equivalent to statusCode(equalTo(int)). For
ranges, use statusCode(allOf(greaterThanOrEqualTo(200), lessThan(300))).
JSON path assertions
get("/lotto").then().body("lotto.lottoId", equalTo(5));
get("/lotto").then().body("lotto.winners.winnerId", hasItems(23, 54));
(Per restassured-usage.)
The first argument is a Groovy-style JSON path
(models[0].author.name); the second is a Hamcrest matcher.
XML path assertions
given().parameters("firstName", "John", "lastName", "Doe").
when().post("/greetXML").
then().body("greeting.firstName", equalTo("John"));
(Per restassured-usage.)
Reuse request and response specifications
Per usage (Specification Re-use), build shared setup once with
RequestSpecBuilder and shared expectations
Установить restassured-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл restassured-testing?
Use whenever Java/JVM API tests need writing or fixing: loose assertions that let an empty 200 pass, slow sequential suites, or hand-rolled HTTP clients. Writes REST Assured given/when/then tests: status, JSON and XML path checks, auth, reusable specs, schema checks, Maven or Gradle and CI reports.
Как установить скилл restassured-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл restassured-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic