Software Testing

Beginner path · lesson 27 of 35

BeginnerTools and hands-on6 min readPublished November 12, 2026

How the web works: what every tester needs to know

Clients and servers, URLs, DNS, HTTP requests and responses, status codes, cookies and sessions. The basics behind every web app, explained for testers, so you can tell where a bug lives and describe it precisely.

On this page

Key takeaways

  • A web app has a client (the browser or mobile app) that sends HTTP requests to a server, which sends back responses. Most bugs live on one side or the other, or in what travels between them.
  • Every response has a status code: 2xx success, 3xx redirect, 4xx the client asked for something wrong, 5xx the server failed. Knowing them makes your bug reports far sharper.
  • Cookies and sessions are how a site remembers who you are between requests. Many login, cart and security bugs live there.

Why testers need this

You can test a website without knowing how it works. But when something breaks, you'll only be able to say "the page doesn't work".

A tester who knows the basics can say: "Clicking Save sends a POST to /api/profile, which returns 500. The front end shows no error and the data isn't saved." That bug gets fixed in an hour, not a day. It's also a frequent interview topic: "What happens when you type a URL into the browser?"

Client and server

  • The client is what the user touches: a browser, or a mobile app. It shows the interface and sends requests. This is the front end.
  • The server is a computer somewhere else that receives requests, runs the business logic, reads and writes the database, and sends back responses. This is the back end.

They talk over the network using HTTP, or its encrypted version, HTTPS.

What happens when you open a page

  1. You type https://shop.example.com/products?category=shoes.
  2. DNS (the internet's phone book) translates shop.example.com into the server's IP address.
  3. The browser opens a secure connection (that's the "S" in HTTPS).
  4. It sends an HTTP request: "GET me /products?category=shoes".
  5. The server processes it, maybe queries a database, and sends back a response: a status code, headers and a body (HTML, JSON, an image).
  6. The browser renders the page, and usually sends dozens more requests for styles, scripts, images and data.

Anatomy of a URL

https://shop.example.com:443/products/shoes?color=red&size=42#reviews
└─┬─┘   └──────┬───────┘└┬┘ └─────┬──────┘ └───────┬────────┘ └──┬──┘
scheme       host       port     path         query string   fragment

Testers play with the query string all the time: change size=42 to size=-1, size=abc or remove it entirely, and see what happens.

HTTP requests: methods

MethodUsed forExample
GETReading dataLoad a product page
POSTCreating somethingPlace an order
PUT / PATCHUpdating somethingChange your address
DELETERemoving somethingDelete a saved card

A request also carries headers (extra information, like the language or the login token) and, for POST/PUT/PATCH, a body with the data, usually in JSON.

HTTP responses: status codes

CodeMeaningWhat it tells you as a tester
200 OKSuccessRequest worked. Still check the data is right.
201 CreatedSomething was createdTypical after a successful POST.
301 / 302RedirectThe page moved; the browser follows it.
400 Bad RequestThe request was invalidOften a validation error. Is the message clear?
401 UnauthorizedNot logged inSession missing or expired.
403 ForbiddenLogged in, but not allowedCorrect for permission checks; a bug if you should have access.
404 Not FoundNothing at this addressBroken link, or wrong ID.
500 Internal Server ErrorThe server crashedAlmost always a bug. Report it with the request details.
502 / 503 / 504Server unavailable or too slowInfrastructure or a downstream service is down or overloaded.

Cookies and sessions

HTTP doesn't remember anything between requests. So how does a site know you're logged in?

  • After login, the server creates a session and sends the browser a cookie (a small piece of data) or a token.
  • The browser sends it back with every request. The server reads it and knows who you are.

What testers check here: Does logout really end the session? Can you use the site after the session expires? Does the cart survive closing the browser? If you copy someone's session cookie, can you act as them? (That last one is a security question.)

Front end or back end? Locating the bug

SymptomLikely side
Button misaligned, text overlaps, wrong colourFront end
Form accepts invalid data but the server rejects it with a 400Front-end validation missing (minor)
Server accepts invalid data and saves itBack end (often serious)
Request returns 500Back end
Correct data in the response, but shown wrongly on screenFront end

You find out which by looking at the actual requests in the Network tab. See browser DevTools for testers.

Real-world example · Facebook, 4 October 2021When DNS disappeared

On 4 October 2021, Facebook, Instagram and WhatsApp went offline worldwide for about six hours.

Facebook explained that a faulty configuration change on its backbone network routers triggered the outage. Analyses by Cloudflare and others showed the external effect: the routes to Facebook's DNS servers were withdrawn from the internet, so browsers and apps couldn't even find the address of facebook.com. Reports also said the outage took down internal tools, which slowed the recovery.

For users, every app simply "didn't load". For anyone who understood the layers, the symptom was specific: DNS lookups failing, so no HTTP request ever reached a server.

Lesson: "It doesn't work" can fail at many layers: DNS, connection, server, application, front end. Knowing the layers lets you say where it fails, which is half the diagnosis.

Do

"Clicking 'Apply coupon' with code SAVE10 sends POST /api/cart/coupon, which returns 500. The cart shows no error and the discount isn't applied. Request and response attached."

Don't

"Coupons are broken." No request, no code, no data, so the developer has to rediscover everything you already saw.

Check yourself

You open the URL of another user's order (/orders/1043) while logged in as yourself. You get a 200 response and see their order. What's wrong, and which status code would you expect instead?

Show answer

It's a serious security bug: you can see data that belongs to someone else (an access control problem). The server should refuse the request, usually with 403 Forbidden, or 404 Not Found to avoid revealing that the order exists. Report it immediately and with high severity.