Client-Server and HTTP for Testers

Almost every app — an online shop, a bank, a messenger — follows the “client → server → database” pattern. The user sees only the interface, while the data is stored and changed on the server. A tester who understands this pattern checks not just the screen but also the request, the response, and what was actually saved in the database.

What you gain: you find the cause of a defect (the client, the server, or the data), write precise bug reports with the status code and request body, get ready for API testing in Postman, and answer client-server questions in a job interview with confidence.

Client, server, and database

The client is the program a person uses: a browser or a mobile app. It shows the interface and asks the server for data. The server receives requests, processes them, and sends a response; it never writes to anyone first. The database stores data in tables, and only the server works with it, not the client.

Example. A customer opens a shop catalogue. The browser sends GET /api/v1/products, the server reads the products from the database and returns them as a JSON list with 200 OK, and the browser draws the product cards.

HTTP methods: GET, POST, PATCH, PUT, DELETE

A request contains a method (what to do) and an address (what to do it with). GET reads data and changes nothing. POST creates a new record: the data goes in the request body, and a successful response is 201 Created. PATCH changes part of a record, for example only the price, while PUT replaces the whole record. DELETE removes a record and usually answers 204 No Content.

A tester checks not only the status code but also the result: whether a row appeared in the database, whether only the intended field changed, whether the product disappeared from the catalogue. Repeated requests are worth a separate check: a second POST creates a duplicate, while GET can be repeated any number of times.

Status codes: 2xx, 4xx, 5xx

The first digit of the code tells you what happened: 2xx is success, 4xx is a client error (a wrong or impossible request), and 5xx is a server-side error. 401 Unauthorized means the server does not know who sent the request. 404 Not Found means there is no such resource. 405 Method Not Allowed means the address exists, but this method is not allowed for it.

Example. An empty search result is not an error. The server answers 200 OK with an empty list [], and the tester checks that the user sees a clear hint rather than a blank screen.

Client-server in real projects

Real systems have many clients, and one server is not enough. A load balancer distributes requests, several backends and databases work together, and the application can be a monolith or a set of microservices. Understanding the architecture tells you where to look for defects at the joints between components and what to check in integration and system testing.

APIs and Postman

The client is not only a browser: it can be a mobile app, another server, or a tester’s tool. All of them call an API — a set of addresses (endpoints) the server is ready to serve. In Postman, a tester sends requests directly, without the interface, and checks the server’s responses, including path and query parameters.

Check the theory in the client-server quiz