Thursday, November 30, 2017

API Testing 02: What does REST means and What are RESTful Web Services?

SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) are two popular and mostly used web services technologies to develop the web services. Both uses http protocol internally for developing a web services. In this tutorial our focus is on RESTful web services.

History of REST:

REST web services were first introduced by Roy Fielding in 2000 at University of California; Mr.Roy had submitted a thesis on developing web services using HTTP protocol with some principles. The web services developed using HTTP protocol binding to the principles of Roy Fielding are called RESTful web services. REST stands REpresentational State Transfer. Some of the principles of Roy are discussed below:

Representational:

According to Roy, a web services should be build in client - server architecture style, where the client will be sending the request and server will be providing the required information as response. In an application the client (GUI)  should be separated from the back-end (Database or any data source), So that the client and server become independent each other.

When client and server becomes independent each other, multiple clients can interact with a server and client or server can evolve further in different technologies.

One should keep in mind when designing a RESTful web service that it should support or represent multiple data formats like XML, JSON, Txt and etc. Which means it should be able to understand and process all the data formats. Since the web service is representing multiple data formats and serving multiple clients it is said to be REpresentational style.

State Transfer or Stateless:

The client and server know each other during the request-response period only, once the request is processed they will know longer recognize each other. That is no information of client is stored on server, every time the client will be a new client to it. So they do not the state of each other once request processed, so it is said to be connection less or Stateless.

When we are accessing a source on the server using URI or URL, the web service should be able retrieve the state of source at that particular instant, and do not fix the data that needs to be retrieved in the source. If the source gets updated the state of source will be changed and the web service should be able to retrieve updated state of the source in the new instant, Since the web service is transferring the state of the source present on the server every time it is State Transfer.

This is how REpresentational State Transfer or REST web services are derived. From the next post we will see testing of RESTful web services testing using Rest-assured library.

Hope you get basic understanding about REST background, Let me know if questions.

#HappyLearning #HappyTesting

No comments:

Post a Comment

Katalon 08: Integration of HP ALM with Katalon Studio

In this post, this post we discuss about integration of  HP ALM with Katalon Studio. If we can integrate HP ALM with Katalon we can update ...