API test automation

REST API tests in plain English, backed by REST Assured

Test any JSON API with ready-made Cucumber steps. Send requests, save values, check fields and schemas, and see every request and response in the Serenity report.

An API test without Java

Scenario: Create and fetch a user
  When I send a POST request to "/users" with the body from "payloads/new-user.json"
  And I save the response field "id" as "userId"
  When I send a GET request to "/users/${userId}"
  Then the response status code should be 200
  And the response field "name" should be "Ada"
  And the response should match the JSON schema "user.json"

Each step is backed by REST Assured, and the report records the full request and response for every call, so a failure shows exactly what the API returned.

Ready-made API steps

StepWhat it does
Given I set the header "X-Api-Key" to "abc"Adds a header to every following request
Given I set the query parameter "page" to "2"Adds a query parameter to the next request
Given I use the bearer token "..."Sets Authorization: Bearer ...
When I send a GET request to "/users/42"GET, POST, PUT, PATCH, DELETE and more
When I send a POST request to "/users" with body:Inline JSON as a doc string, or a body from a file
When I save the response field "id" as "userId"Reuse it later as ${userId}
Then the response field "address.city" should be "Leeds"GPath expressions, several fields at once with a table
Then the response field "items" should have 3 itemsArray sizes, comparisons, contains and not empty
Then the response should match the JSON schema "user.json"Validates the whole response shape
Then the response time should be under 500 millisecondsA simple performance guard

Built for real APIs

For a step-by-step walkthrough, read our Cucumber and REST Assured example.

Automate your API test cases

Paste a manual API test case into the live demo and see the scenario it becomes.