🛠️ QA Shop Setup Guide
We start from zero. Even if nothing is installed on your machine: every single step, from installing Docker to a real database, from the API contract to a test pack that runs on the command line.
Bring a real PostgreSQL and REST API up on your own machine step by step: install Docker, connect with DBeaver, read the OpenAPI contract, test with Postman.
This lab runs as a separate database and a separate server process. It has no connection to the site's membership, progress or badge data — nothing here can touch real user data.
What you can learn on this page
- Install Docker and start the practice stack — Installing a database directly requires this chain: walk through an installer, pick a version, start the service, define a user and password, then load the schema and data by hand. Every link in that chain varies from machine to machine, and if one slips, the
- Connect to the database (DBeaver) — The interface says "Order created" and shows a green confirmation. That sentence does not tell you whether the order total matches its line items. Nor that stock was decremented. Nor that the coupon counter advanced. All the interface can show you is
- Read the API contract (Swagger / OpenAPI) — An API test written without reading the contract simply copies the API's current behaviour. If there is a bug, the test is written together with the bug and stays green forever. The contract is the only document that separates what should happen from what does
- Test the endpoints — by hand first, then Postman — Automation repeats work you already understand. Trying to automate work you do not understand automates the mistake as well. Walking the flow once by hand shows you which endpoint produces which data, which value must carry into the next request, and where thi
- A1 · Reconciliation — Whether an order’s grand total is derived from its own components (subtotal, discount, shipping).
- A2 · Reconciliation — Whether the subtotal on the order header equals the sum of that order’s line totals.
- A3 · Reconciliation — Whether each order line’s total equals that line’s quantity times its unit price.
- A4 · Reconciliation — Whether the amount of a successful or refunded payment matches the grand total of the order it belongs to.
- B1 · Referential integrity and tenant isolation — Whether an order line’s tenant scope matches the scope of the order it belongs to.
- B2 · Referential integrity and tenant isolation — Whether a cart line’s tenant scope matches the scope of the cart it belongs to.
- B3 · Referential integrity and tenant isolation — Whether a variant’s tenant scope matches the scope of the product it belongs to.
- B4 · Referential integrity and tenant isolation — Whether there is an order header with no lines at all.
- B5 · Referential integrity and tenant isolation — Whether every variant has an inventory record.
- C1 · Business rule violations — Whether the reserved quantity on a variant exceeds the stock on hand.
- C2 · Business rule violations — Whether a coupon’s usage count has passed its defined maximum.
- C3 · Business rule violations — For discounted orders, whether the coupon was inside its validity window AT the moment the order was placed.
- C4 · Business rule violations — For discounted orders, whether the cart total meets the minimum the coupon requires.
- C5 · Business rule violations — Whether a cancelled order has a shipment record attached to it.
- C6 · Business rule violations — Whether every shipped or delivered order has a successful payment.
- C7 · Business rule violations — Lists products where the average computed from approved reviews diverges from the average computed from all reviews.
- C8 · Business rule violations — Lists inactive (soft-deleted) products that were ordered in the past.
- D1 · Data quality — Groups emails that differ only by letter case. The database’s UNIQUE constraint is case-sensitive.
- D2 · Data quality — Gives the count of products whose brand link is NULL. Such products vanish silently from a list built with an INNER JOIN.
- D3 · Data quality — Products with a price of zero or below.
- D4 · Data quality — Whether every user has exactly one default address.
- D5 · Data quality — Records whose order date is in the future.
- E1 · Log analysis — Ranks total and failed request counts per action, ordered by error rate.
- E2 · Log analysis — Fetches every log line for a single correlation_id in time order.
- E3 · Log analysis — Computes each action’s own p95 threshold and lists the requests above it.
- E4 · Log analysis — Buckets errors by hour to show when they cluster.
- G1 · Analysis and reporting — Computes revenue per product from non-cancelled, non-returned orders and ranks it with a window function.
- G2 · Analysis and reporting — Order count, revenue and average basket value bucketed by month.
- G3 · Analysis and reporting — Users not attached to any order (the LEFT JOIN + IS NULL pattern).
- G4 · Analysis and reporting — Parent-child category pairs and the active product count per child category (a self-join).