Make Selenium Easy

REST Assured Tutorial 1 – Introduction to REST Assured

Last updated on October 30th, 2019 at 09:02 pm

Demand of API Testing is increasing day by day as it helps in finding bugs early in Software development life cycle and prevents major bugs at later stages. We can perform API Testing manually and programatically i.e. Automation.

We have covered Manual API Testing using Postman. Now it’s time to learn about API Testing Automation using Java library called Rest Assured.

REST-assured is an Open Source Java library which is used to test and validate REST APIs. Dynamic languages like Groovy , Ruby are helpful in API testing which was harder in Java. We have a famous Java library named Apache Http Client which is also used to do API Testing but it requires a lot of coding. Rest Assured makes API testing simple in Java.

REST Assured is developed and maintained by Johan Haleby. He started the project when he was working at Jayway back in December of 2010. The project is now sponsored by Parkster.

Advantages of Rest Assured are listed below:-

  1. It is an Open source i.e. free.
  2. It requires less coding compare to Apache Http Client.
  3. Initial setup is easy and straightforward before you hit any endpoint.
  4. Easy parsing and validation of response in JSON and XML.
  5. It follows BDD keywords like given(), when(), then() which makes code readable and supports clean coding. This feature is available from version 2.0.
  6. Very rich in readymade assertion
  7. Quick assertion for status code and response time.
  8. Powerful logging mechanism.
  9. Can be easily integrated with other Java libraries like TestNG, Junit for Test Framework and Extent Report , Allure Report for reporting purpose.
  10. Very good support for different authentication mechanism for APIs.
  11. Can be integrated with Selenium-Java to achieve End to End automation.
  12. Supports JsonPath and XmlPath which helps in parsing JSON and XML response. Rest Assured by default integrates both.
  13. Can be used to verify Json Schema using JSON Schema Validation library.
  14. Includes XML schema validation
  15. Can be integrated with Maven and CICD.
  16. REST Assured 4.1.2 is released. It adds support for Java 13.

Disadvantages of Rest assured:-

  1. Does not support SOAP APIs explicitly.
  2. Less community support
  3. Requires good Java programming knowledge

Important Note:-

Rest assured versions 2.9.0 and older have groupId as “com.jayway.restassured” and Rest assured 3.0.0 onwards, groupId is “”. So do not confuse with this.

We will see more about Rest assured in upcoming posts.

Stay tuned.

Share this post to your colleagues and friends to extend their knowledge.



Author: Amod Mahajan

My name is Amod Mahajan and I am an IT employee with 6+ years of experience in Software testing and staying in Bengaluru. My area of interest is Automation testing. I started from basics and went through so many selenium tutorials. Thanks to Mukesh Otwani as his tutorials are easy and cover basics to advance. I have habit of exploring concepts by deep diving. I used to make notes. I thought of sharing my knowledge through posts and now I am here. #KeepLearning #ShareLearning

3 thoughts on “REST Assured Tutorial 1 – Introduction to REST Assured

Leave a Reply

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.

REST Assured Tutorial 1 – Introduction to REST Assured

by Amod Mahajan time to read: 2 min
%d bloggers like this: