top of page

REST Assured Tutorial

Introduction To REST Assured

What Is REST Assured ?

REST Assured is an open source JAVA based library which is highly used in REST API test automation or Restful web services and in API response validation including API parameters validations. The library supports all the HTTP methods.
It has a Gherkin type syntax and supports BDD(Behaviour Driven Development) approach. It provides various features for JSON response, DSL like syntax, specification reuse, xpath validation, easy file uploads and can also be used to test XML based web services.
Rest Assured can be integrated with all major automation frameworks like- testNG, JUnit, maven and CI/CD.
To request a command for REST API, HTTP methods are used and they are five in numbers as follows :
  • GET

Retrieves the information at a particular URL.

  • PUT

Updates the previous resource if it exists or creates new information at a particular URL.

  • POST

Used to send information to server like uploading data and also to develop a new entity.


Deletes all current representations at a specific URL.


Used for partial updates of resources.

Once the request is sent through these methods, the client receives the numeric codes known as 'Status Codes' or 'Response Codes' that have some meaning. These codes can be interpreted to know the response sent by the server.
It helps to interpret the outcome of HTTP request.
Status codes are classified into five categories as follows :

  • 1XX (100-199)

The response is informational.

  • 2XX (200-299)

Assures successful response.

  • 3XX (300-399)

You are required to take further action to fufill the request.

  • 4XX (400-499)

There's a bad syntax and the request can't be completed.

  • 5XX (500-599)

The server entirely fails to complete the request.

Status codes 1XX, 2XX and 3XX are not considered as errors but are informative messages and will not affect the user experience.
However, status codes 4XX and 5XX are error meassages.

Refer next page Configure Eclipse With REST Assured
bottom of page