What is REST
REST stands for Representation State Transfer. RESTful Web Services are basically REST architecture based Web Services. These web services are light weight, highly scalable and very commonly used for creating APIs for web-based applications. In most of the Organisations, Rest assured is one of the most popular and highly used in API Test Automation.
Before going further we need to discuss few points like:
What is API
API stands for Application Programming Interface, it is basically a set of functions that can be accessed and executed by another software system. Hence, it serves as an interface between various software systems and establishes their interaction and data exchange.
What is API Testing
API Testing is different from GUI Testing and it mainly focus on the business logic layer of the software architecture. Mostly web applications are designed in below 3 layers:
1) Presentation Layer – User Interface (UI)
2) Business Layer – Business logic or Applicatio User Interface
3) Data Layer – Database. (DB)
API mainly interact with Business Layer and validate the functionality, reliability, performance, and security.
In API testing, we send requests to the API and get the respones. These APIs are basically SOAP and REST APIs. In these APIs, we generally send or recieve JSON or XML message payloads which is being sent over HTTP, HTTPS etc.
What is difference between REST and SOAP API’s
REST is an architectural style which uses simple HTTP protocols for inter-machine communication. REST can use SOAP web services because it is a concept and even can use any protocols like HTTP, SOAP. REST requires less bandwidth and resource than SOAP API. REST permits different data format such as Plain text, HTML, XML, JSON etc
SOAP is a protocol which stands for Simple Object Access Protocol. SOAP requires more bandwidth and resource than REST API. ALso SOAP API only permits the XML data format.