QA Exercise 14

Exercise · Bug Hunt (Shopping Cart: Discounts & Totals)

QA · Hands-on
Adjust quantities, apply discount codes, change shipping options, and compare the displayed totals. Find defects in rounding, negative totals, coupon validation, free shipping thresholds, and “remove item” logic. Then present a spoken bug report.
Intentionally buggy: discount can be applied multiple times, totals can go negative, rounding is inconsistent, free shipping threshold is wrong, invalid coupon sometimes applies, and removing items can remove the wrong row.
Keyboard $49.99
SKU: KBM-001
1
Mouse $19.50
SKU: MSE-014
2
HDMI Cable $8.25
SKU: HDM-777
1
No coupon
Subtotal: $0.00
Discount: $0.00
Shipping: $0.00
Tax (8%): $0.00
Total
$0.00
🎯 Instructions (Oral) task flow
  1. Change quantities (increase and decrease) and observe whether totals update correctly.
  2. Apply SAVE10 multiple times. Watch discount/total behavior.
  3. Try invalid codes like BADCODE. Check whether the UI rejects it consistently.
  4. Try FREESHIP and then change shipping options. See if shipping is truly free.
  5. Remove the middle item (Mouse). Confirm whether the correct item disappears.
  6. Attempt to make the total negative (e.g., apply discounts repeatedly).
  7. Give a spoken bug report: Title → STR → Expected vs Actual → Severity/Priority → Recommendation.
📖 Vocabulary definitions
  • subtotal — sum of item prices before discounts, tax, and shipping.
  • discount — reduction in price due to a coupon or promotion.
  • coupon validation — checking whether a promo code is valid and applicable.
  • free shipping threshold — minimum subtotal required to qualify for free shipping.
  • rounding — converting numbers to a fixed number of decimals (e.g., cents).
  • tax calculation — computing tax based on rules and taxable amount.
  • negative total — when the system calculates a total below $0 (usually invalid).
  • line item — a single product row in the cart.
🧩 Collocations natural pairings
  • apply a coupon / stack discounts (often not allowed)
  • update the totals / recalculate tax
  • validate a promo code / reject invalid codes
  • qualify for free shipping / meet the threshold
  • remove a line item / adjust quantities
  • round to two decimals / avoid rounding errors
🗣️ Idioms & Phrasal Verbs natural speech
  • add up — make sense mathematically: “The totals don’t add up.”
  • mess up — handle incorrectly: “The cart messes up the discount.”
  • kick in — start applying: “Free shipping should kick in at $50.”
  • back out — remove/revert: “Back out the coupon and recalculate.”
  • lock down — make strict: “Lock down coupon rules to prevent stacking.”
🎤 Model Answer (spoken style) example

Bug title: Shopping cart allows coupon stacking and can calculate a negative total; remove item deletes the wrong line item.

Steps to reproduce: First, open the cart and apply SAVE10 three times. Next, observe the discount value and the total. Then click Remove on the Mouse line item and confirm which row disappears.

Expected result: Coupons should be validated and applied only once, totals should never go negative, and removing an item should remove the correct line item.

Actual result: The discount stacks multiple times, the total can drop below $0, and Remove can delete a different item than the one selected.

Severity / Priority: High severity, P1 — pricing errors impact revenue and customer trust.

Recommendation: Enforce single-use coupon rules, clamp totals at $0, use deterministic rounding, and remove items by SKU/ID rather than index.