QA Exercise 10
Exercise · Bug Hunt (Shopping Cart, Promo Codes & Totals)
QA · Hands-onSAVE10 (10% off) or FREESHIP.
🎯 Instructions (Oral) task flow
- Add 2 T-Shirts and 1 Mug. Then set a Sticker Pack quantity to -2 and 1.5 to test validation.
- Apply
SAVE10twice and thenFREESHIP. Switch shipping between Standard and Express. - Adjust Mug quantity until subtotal crosses $50. Observe whether free shipping applies correctly.
- Delete the second item and check which row is actually removed and whether totals/count update correctly.
- Click Checkout and read the status message. Compare displayed grand total with your manual expectation.
- Present your spoken bug report: Title → Steps to Reproduce → Expected vs Actual → Severity/Priority → Recommendation.
📖 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.