Automating Google Place API Using Rest Assured-Part 2

Automating Google Place API Using Rest Assured-Part 2

In this blog we will be continuing with a few more Google Place API along with some new test using Rest Assured.
I assume you have also gone through my first blog on working with google place API and have an exclusive API Key to the access server is with you.

Now in this blog, I would be starting first with Google place Details API.

As per Specification is our Base URI,
Whereas maps/api/place/details/output is resource URI.

Request type is GET and mandatory parameter for accessing API is key and placeid (this place id we already have captured in our last blog).

Along with this I am also using one optional parameter “fields” for capturing name, rating, and phone a number of that captured placeid.

First let’s execute this request through our postman.

As we can see in output we can get phone number, rating, and name of the provided placeid.

Now the same assertions we can build in our rest assured test along with verification of status code, header and response time.

Below is the Full code Snapshot :

Output of the above code execution would be :

Finally lest look into one more Google Place Search API i.e text search Request API.

In this Request I will search for an address that includes location and radius parameters to bias the results to a region of interest.

Here Request type is GET,
BaseURI is and
Resource URI is maps/api/place/textsearch/json

Mandatory a parameter is query where we would be providing address along with API key.

I would also be passing few optional parameters such as location and address

First let’s execute this request through our postman.

Code The snapshot in Rest Assured:

Output of above code execution



My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post