Loading…
Loading…
POST /api/cart/items accepts:
1{ "productId": "prd-001", "quantity": 3 }The contract states quantity is an integer between 1 and 10 inclusive. A request that violates the schema returns 422 with {"code":"VALIDATION_ERROR"}. An unknown productId returns 404 PRODUCT_NOT_FOUND. An unauthenticated request returns 401 UNAUTHENTICATED.
Your task: produce the minimum set of test cases you would actually run, using equivalence partitioning and boundary value analysis. For each, give the input, the expected status, and — this is the part candidates skip — say why that case is in the set. Then name what you would not test, and why.
Write your own answer first — the defect report, the case table, the locator, whatever the question asks for. An interviewer grades your reasoning, not your recall.
Practice this live with an AI interviewer
Starts a QA mock interview pre-filled with this problem — you can edit the brief before starting.