Module 1. Software testing fundamentals · Lesson 7 of 41 · 12 min

Web and API testing

DevTools, client-server, HTTP status codes, Postman, cross-browser and responsive testing.

Client, server and HTTPBrowserclient · DevToolsServerAPI · databasePOST /api/orders { … }201 Created2xx success4xx bad request5xx server error
Client, server and HTTP. The browser sends a request, the server returns a response with a status code. 4xx is a client error, 5xx a server error.

Client and server

The browser (client) sends a request, and the server returns a response. Most web bugs live on the front end (rendering, validation), on the back end (logic, data) or in how they talk to each other.

HTTP methods and status codes

Method Used to
GET Retrieve data
POST Create
PUT / PATCH Update
DELETE Delete
Code Meaning
2xx Success (200 OK, 201 Created)
3xx Redirect
4xx Client error (400, 401, 403, 404)
5xx Server error (500, 502, 503)

DevTools — the tester's main tool

  • Elements — markup and styles, layout checks.
  • Console — JavaScript errors.
  • Network — requests, codes, bodies, timing. This is where the HAR file for a bug report comes from.
  • Application — cookies, localStorage.
  • Device toolbar — mobile screen sizes.

If the UI says "error" and Network shows a 500, it's the back end. If the request returns 200 with the right data but the UI shows something else, it's the front end.

API testing

In Postman you check status codes, JSON structure, validation (empty and invalid fields), authentication (no token → 401) and authorization (someone else's resource → 403/404).

Cross-browser and responsive testing

Chrome, Firefox, Safari, Edge; widths of 360, 768 and 1280+ px. Test Safari on iOS separately — it causes the most surprises.

Key takeaways

  • The Network tab in DevTools tells you whose bug it is — front end or back end.
  • 4xx is a client request error, 5xx a server error.
  • APIs are tested separately from the UI: it's faster and more precise.

Check yourself

  1. 1. The UI shows "Something went wrong" and Network shows a 500. Whose bug is it most likely?

  2. 2. A request without an auth token should return…

  3. 3. Where in DevTools do you see JavaScript errors?