QA Exercise 10

Exercise · Bug Hunt (Shopping Cart, Promo Codes & Totals)

QA · Hands-on
Add items, adjust quantities, apply a promo, choose shipping, and review totals. Find defects in quantity validation, tax/shipping rules, coupon math/limits, deletion, rounding, and total synchronization. Report via STR → Expected vs Actual → Severity/Priority → Recommendation.
Intentionally buggy: negative/decimal quantities allowed, promo sometimes adds cost or stacks multiple times, free shipping threshold misapplied, tax uses wrong base, delete removes wrong row, totals desync, rounding inconsistent.
Catalog (click “Add” to put items in cart)
T-Shirt $19.99
Mug $12.50
Sticker Pack $4.00
Cart 0 items
Try: SAVE10 (10% off) or FREESHIP.
Subtotal: $0.00
Discounts: $0.00
Shipping: $0.00
Tax (10%): $0.00
Grand Total: $0.00
🎯 Instructions (Oral) task flow
  1. Add 2 T-Shirts and 1 Mug. Then set a Sticker Pack quantity to -2 and 1.5 to test validation.
  2. Apply SAVE10 twice and then FREESHIP. Switch shipping between Standard and Express.
  3. Adjust Mug quantity until subtotal crosses $50. Observe whether free shipping applies correctly.
  4. Delete the second item and check which row is actually removed and whether totals/count update correctly.
  5. Click Checkout and read the status message. Compare displayed grand total with your manual expectation.
  6. Present your spoken bug report: TitleSteps to ReproduceExpected vs ActualSeverity/PriorityRecommendation.
📖 Vocabulary definitions
  • input validation — enforcing rules on user entries (e.g., quantity ≥ 1, integer only).
  • business rule — a product/commerce rule (e.g., “free shipping over $50”).
  • subtotal — sum of item prices before discounts, shipping, and tax.
  • rounding — converting to a fixed number of decimal places (e.g., 2 for currency).
  • stacking (coupons) — applying multiple promos together (often disallowed).
  • idempotent — repeating an action has the same effect (re-applying a coupon shouldn’t change the discount).
  • desync — UI totals not matching the underlying data/state.
  • threshold — numeric limit that triggers a rule (e.g., ≥ $50).
🧩 Collocations natural pairings
  • enforce quantity limits / reject invalid input
  • apply a promo code / prevent stacking
  • calculate tax correctly / round to two decimals
  • qualify for free shipping / respect thresholds
  • sync UI totals / recompute after changes
  • bind delete to the right row / avoid off-by-one errors
🗣️ Idioms & Phrasal Verbs natural speech
  • game the system — exploit a loophole: “I can game the system by stacking coupons.”
  • add up — make sense mathematically: “The totals don’t add up.”
  • back out — remove or undo: “Backing out the discount still leaves shipping free.”
  • zero out — reduce to zero: “Negative quantities zero out the subtotal.”
  • edge out — slightly exceed: “We edged out the $50 threshold but shipping stayed $5.”
🎤 Model Answer (spoken style) example

Bug title: Cart accepts negative/decimal quantities; promos stack and sometimes increase price; free-shipping threshold misapplied; tax base incorrect; delete removes wrong row; totals/rounding desync.

Steps to reproduce: Add 2 T-Shirts and 1 Mug; set Stickers to −2 and then 1.5. Apply SAVE10 twice and then FREESHIP. Switch shipping. Increase Mug quantity to push subtotal over $50. Delete the second line item.

Expected result: Quantities are positive integers; promos apply once and reduce the price; free shipping applies only when subtotal ≥ $50; tax is calculated on (subtotal − discounts + shipping if taxable); delete removes the selected row; UI totals are consistent and correctly rounded.

Actual result: Negative/decimal quantities are accepted; applying SAVE10 twice stacks or even increases the total; free shipping triggers inconsistently; tax uses the wrong base; deleting the second item removes a different row; totals jump and don’t add up due to rounding.

Severity / Priority: Critical (P0) — incorrect charges and potential financial loss.

Recommendation: Enforce integer ≥ 1 for quantities; make promo application idempotent and disallow stacking; compute shipping eligibility from a canonical subtotal; define a single tax base; bind deletion to stable item IDs; recompute totals from source data and round at the end.