Wednesday, November 29, 2017

API Testing 01: What is a web service and what is an API?

In the real-world, applications talk (exchange data) with each other over the Internet using http protocol. This data exchange across different applications over the Internet is web service.

The applications can be developed in different technologies like Java, .Net, Php, Python and etc. but to communicate with each other or exchange the data, web service uses a common messaging system, like XML or JSON for data exchange.


There are two main components in a web service,  client and server.

The machine requesting for information is called Client and the machine providing the requested information as response is called Server. Typically Web Service is an object-oriented web based interface between client and server.

Application Program Interface (API)Technically an API – is set of functions or methods that are used in developing a product or service.

In other words – It is an application program that interacts with other applications internally or externally and retrieves required information.

Example 1: Consider POI API from Apache, we are using this in our project to read/write excel data.

Example 2: Consider java.util.File package, this is also an API. We are using this in our project for file I/O operations.

Example 3: In the similar way Selenium WebDriver is also an API that contains different methods to perform actions on the browser.

If you are booking a flight ticket on goibibo.com, you will be entering source, destination and date of travel and clicking on the search button. A program from goibibo.com takes all the user data and it will communicates with the different flight service servers like Air India, Air Asia, Indigo, Jet Airways and etc. and retrieves the corresponding  data and displays on the page Goibibo page. This program from goibibo.com side which is taking the user data is also an API.

Hope this post gave you basic understanding about Web Services and API. In the next post we will see what is API testing and what are the advantages of it. API Testing 02: What is API testing?

#HappyLearning #HappyTesting #qababuworks

1 comment:

  1. REST API is a set of functions helping developers in performing requests along with receiving responses. Through HTTP protocol interaction is made in REST API.

    Thanks for sharing such a valuable post and Keep Sharing !!!!
    API testing

    ReplyDelete

DevOps 01: What is DevOps and How it benefits organizations?

DevOps is a culture in an organization, where the development team and operations team help each other by sharing information, process and t...