Sign in

RestAssured POST method with Data Driven Approach passing data through Excel sheet — PART-3

This is my third blog in the series of Rest Assured Method. Links to earlier logs:

1. REST ASSURED API testing GET METHOD PART-1

2. GET METHOD with Key and Values pair combination PART-2

To test and validate the API while using POST request with Rest Assured and using Data-Driven approach. I have used the Data-driven framework so while executing POST requests, all the Test data which was stored in the Excel sheet was passed to the POST request.

**Request body is actually the payload which…


GET METHOD with Key and Values pair combination PART-2

This is my second blog in the series. Part 1 covered GET Method with RestAssured.

In order to test and validate the API with RestAssured sometimes it is needed to have sequential combination keys and values from Json Response of TESTAPI.

I have used the API https://reqres.in/api/users?page=2

In this API with Get Method and status code of 200, this is the Response

{“page”:2,”per_page”:6,”total”:12,”total_pages”:2,”data”:[{“id”:7,”email”:”michael.lawson@reqres.in”,”first_name”:”Michael”,”last_name”:”Lawson”,”avatar”:”https://reqres.in/img/faces/7-image.jpg"},{"id":8,"email":"lindsay.ferguson@reqres.in","first_name":"Lindsay","last_name":"Ferguson","avatar":"https://reqres.in/img/faces/8-image.jpg"},{"id":9,"email":"tobias.funke@reqres.in","first_name":"Tobias","last_name":"Funke","avatar":"https://reqres.in/img/faces/9-image.jpg"},{"id":10,"email":"byron.fields@reqres.in","first_name":"Byron","last_name":"Fields","avatar":"https://reqres.in/img/faces/10-image.jpg"},{"id":11,"email":"george.edwards@reqres.in","first_name":"George","last_name":"Edwards","avatar":"https://reqres.in/img/faces/11-image.jpg"},{"id":12,"email":"rachel.howell@reqres.in","first_name":"Rachel","last_name":"Howell","avatar":"https://reqres.in/img/faces/12-image.jpg"}],"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!”}}…


REST ASSURED API TESTING GET METHOD PART-1

To test and validate REST API for JAVA based framework, RestAssured is the solution. RestAssured is simple to test and validate the responses from REST API.

RestAssured contains the JAVA library DSL to test REST based API and its on HTTP builder so when we get the Json response by sending the HTTP request ,we can use different methods like GET,PUT,DELETE,OPTIONS ,PATCH ,HEAD to validate the response.

Advantages to use with JAVA: It’s very easy to integrate with testing framework like TestNG, Junit.

Special Features: RestAssured uses the package Package io.restassured …

Mani B

Mani has done Masters in Electronics and currently working in IT Automation SDET .Her area of specialization in Java ,Selenium ,Katalon, REST API ,RestAssured.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store