Restful API Automation with RestAssured

In this blog, we shall be building the Automated Tests for set of APIs.

Question #1.) How to log the response of a CREATE API ?

Answer.) Here, we are creating a product, by hitting the Restful API through the help of RestAssured.

Question #2.) Can we supply the Object of Product, while hitting to the CREATE API ?

Answer.) Here, we are creating a product, by hitting the Restful API through the help of RestAssured and we are passing the Object of Product class.

Question #3.) Since GET API usually returns lot of data along with it, can we also verify and assert on the data returned by the GET API ?

Answer.) Yes, for sure. We can assert on the various response-fields. Note here that :-

Question #4.) Can we directly compare the Objects, as returned by the API ?

Answer.) Yes absolutely possible. We can verify on the objects too.

Question #5.) How to perform check on GET API, in case a single object is being queried against ?

Answer.) Here, we are fetching a single product, by supplying the query-parameter in request through RestAssured.

Question #6.) Again In case a single object being queried against, How to perform check on GET API’s response object ?

Answer.) Here, we are fetching a single product, by supplying the query-parameter in request through RestAssured.

That’s all in this blog. We would see you soon again. Till then, do clap on thsis page. :)

--

--

Software Engineer for Big Data distributed systems

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