Basic Concept of API Testing

.

Concept of API Testing- Everything You Need to Know 

What is Client and Server?

Client: A client is a computer hardware device or software that accesses a service made available by a server. The server is often (but not always) located on a separate physical computer.

"A client is a computer or from where we are trying to access the application"

Example: Through a browser, we can browse different pages and access various websites. This activity falls under the category of a client. The device or application we use to access the application is referred to as the client.

Server: A server is a physical computer dedicated to running services to serve the needs of other computers. Depending on the service that is running, it could be a file server, database server, home media server, print server, or web server.

Example:




What is an API?

Application Programming Interface (API): API is the way of communication between two applications where the application may differ in their platform.

For example, there are two different applications that want to communicate with each other and there should be some immediater that is API.

Types of API

There are two types of API available in API Testing.

  • SOAP (Simple object access protocol)
  • REST (Representational state transfer)
API and Web Services 

API: Basically API gets some requests from us and gives some responses to us that is the job of API.

Web services: When you keep the API on the internet or it is available on the web everyone is able to access that API which is called a web service.

Example: google map

API VS Web services

  • All web services are API only.
  • All APIs are not web services.
  • Web service supports only XML.
  • API supports only XML and JSON.
  • A web service needs a network while an API does not need a network for its operation.

REST API 

Basically, REST API take the request from the user or client and the same request will be sent to the server The server will process the data and fetch the data and the same response will given to the client or user.

Rest API Methods / HTTP Request

Multiple methods exist in REST API, but some of the most commonly used REST methods are listed below.

  • get 
  • post
  • put
  • delete
HTTP and HTTPS

HTTP (Hypertext transfer protocol)
HTTP is a protocol web applications use to communicate between their client and server.

https://www.qaacharya.in/

HTTPS (Hypertext transfer protocol Secure)
HTTP is a protocol web applications use to communicate between their client and server more securely.

https://www.qaacharya.in/

Difference :

In HTTP, When you are sending the data through the server your data will be transferred as it is in the original format. 

Password: abc@123

In HTTPS, When you are sending the data through the server your data will be converted into encrypted format.

Password: YxfNQpK6Uw6pA43TEfTgGQ==


Terminology used in API Testing

URI: Uniform Resource Identifier 

URL: Uniform Resource Locator

URN: Unifrom resource name

Payload (Request payload/Response payload)The data that we are sending along with the request and the data that is coming along with the response both are called payload (request payload/Response payload).


Hope!!! The above tutorial on API Testing basic concept is helpful for you...

Team,

QA acharya




Post a Comment

0 Comments