It is a computer hardware device or software that accesses a service made available by a server. The server is often located on a separate physical computer.
It’s a physical computer dedicated to run services to serve the needs of other computers. Depending upon the service that’s running, it could be a file server, database server, home-media server, print server, or web server.
To put it in a nutshell, the client is a place from where users can initiate the request, see the response, and a server is a place where all the data and pages will be available or stored.
When a user opens the browser and sends some URL, that URL will be sent to the server and whatever the data is available at the server, the user gets the response and the data can be seen by the browser.
The server usually stores all the page data in a website and sends the response in different formats such as XML, JSON. The response usually can be HTML code that is interpreted by the browser. The browser interprets the statements and then shows the data in the form of user-understandable data.
There are different architectures present in the client-server.
For instance, we have an application which is having only 2 layers. Examples are Excel files, MS word, etc. In order to work with these applications, users don’t need the internet. When the user opens the file and fills it with some data and saves it, it will be saved in a file system. It’s saved in the file system on a computer hard drive. So here there are only two components in the architecture namely client computer and file server which is nothing but a hard drive. Since the whole process takes place inside a single computer, it’s called 1-Tier architecture.
This architecture consists of 2 layers namely the Client layer and the database layer. When the user opens the form through the client and saves it after inserting/modifying it, the changes happen in the database layer. Since the client and database servers are in different systems, it’s called 2-Tier architecture. Not only there can be one client but also many clients can be connected to the same database server. In this also no need for a network just LAN is enough. Usually, in banks, this kind of architecture is followed(At the end of the day the stored transactions in the local server will be moved to the main server).
Whenever the web application came into the market, this architecture became popular. In this, we have a client layer which is nothing but a browser, a database server where all the data gets stored, and in between both, there will be another layer named the business logic layer. As soon as the user sends the request through a client(browser), the corresponding business logic will get executed. The business logic layer contains business logic in the form of programs. Depending on the request corresponding business logic gets triggered and will be sent to the database server. Business logic will give the response to the client which comes from the database server. API testing depends on the business logic layer. Usually, this layer is known as an application server or web server, and the client layer is known as the presentation layer. The Internet is needed for this type of architecture.
Testing in the presentation layer is known as GUI testing.
Without using UI, if a request is sent to the business logic layer directly and getting the response, the corresponding testing is known as API testing. API is a collection of programs that take an input(request) and give output(response). Postman tools can be used for this.
Testing in the database layer is known as database testing. Connection of the tables etc will be tested.