QA Exercise 3

Exercise · Bug Hunt (Checkout Price Calculator)

QA · Hands-on
Add items, apply a coupon, and review totals. Find and report pricing/validation defects using STR → Expected vs Actual → Severity/Priority → Recommendation.
Intentionally buggy: negative quantities allowed, coupon stacks repeatedly, tax order is wrong, rounding inconsistent, removing an item may delete the wrong row, total can desync.
ItemPriceQtyLine TotalActions
Subtotal: $0.00
Discount: -$0.00
Tax (8%): $0.00
Total: $0.00
🎯 Instructions (Oral) task flow
  1. Add 2–3 items with different prices. Try a negative or zero quantity.
  2. Apply the coupon SAVE10 multiple times; change quantities after applying it.
  3. Remove an item and check which row is deleted; verify subtotals and totals.
  4. Compute the expected total yourself (discount once, then tax on the discounted subtotal) and compare.
  5. Present your spoken bug report: TitleSteps to ReproduceExpected vs ActualSeverity/PriorityRecommendation.
📖 Vocabulary definitions
  • input validation — rules that prevent invalid entries (e.g., negative quantity).
  • business rule — product logic that must be enforced (e.g., one-time coupon, tax order).
  • subtotal — sum of line totals before discounts and tax.
  • rounding — formatting numbers to a fixed precision (e.g., 2 decimals).
  • order of operations — sequence for applying discount and tax.
  • desync — UI totals not matching internal state due to logic errors.
  • off-by-one — using the wrong index when removing/updating items.
  • source of truth — the authoritative data structure from which UI is derived.
🧩 Collocations natural pairings
  • enforce quantity limits / reject invalid input
  • apply a coupon once / prevent stacking
  • calculate tax after discount / round to two decimals
  • sync UI totals with state / recompute after changes
  • map actions to stable IDs / avoid index-based deletes
🗣️ Idioms & Phrasal Verbs natural speech
  • add up — make sense numerically: “The totals don’t add up.”
  • boil down to — the core reason is: “It boils down to wrong tax order.”
  • back out — undo a change: “We need to back out the coupon stacking.”
  • line up — match correctly: “The UI doesn’t line up with the cart state.”
  • iron out — resolve: “Let’s iron out rounding inconsistencies.”
🎤 Model Answer (spoken style) example

Bug title: Coupon stacks repeatedly and tax is calculated before discount; negative quantities allowed; deleting removes the wrong row.

Steps to reproduce: Add “Cable” at $10 ×2 and “Charger” at $20 ×1. Apply SAVE10 twice. Change “Cable” to −1. Remove “Charger.”

Expected result: Coupon applied once (10% off subtotal), negative qty rejected, delete removes the selected row, tax calculated on discounted subtotal with proper rounding.

Actual result: Coupon stacks with each click, negative qty accepted and counted, delete sometimes removes a different row, tax computed on pre-discount subtotal with inconsistent rounding.

Severity / Priority: Major severity, P0/P1 depending on release scope — pricing and tax errors affect billing accuracy.

Recommendation: Enforce qty ≥ 1, lock coupon to single application with idempotent state, compute subtotal → discount → taxable base → tax → total, use stable item IDs for actions, and centralize rounding to two decimals.