99testsStart a job

Test case library · Shopping, delivery & travel

Test cases for a shopping cart in an e-commerce app

The cart holds what a shopper means to buy: items, variants, quantities, coupons and a PIN code check, often kept for days before checkout. In the field it breaks when prices or stock change behind the shopper's back, when a guest cart is lost at login, or when a slow network and a budget phone leave the cart out of step with the server.

36 test cases10 release-blocking (P1)10 need a real phoneUpdated 2026-10-29

From the reviews. Shopping storefronts had few malfunction reviews (3.6% of reviews); 77.9% of complaints were about orders, delivery, refunds and fees rather than the app itself.

category page · India App Quality Report

In scope

  • Adding, removing and changing quantities
  • Size and colour variants
  • Price and stock changes on items already in the cart
  • Cart sync across devices, logout and guest-to-account merge
  • Coupons, quantity limits and save for later
  • PIN code serviceability in the cart

Out of scope

  • Address entry, payment and order placement
  • Product search and listing pages

Before you start

  • Two test accounts, plus a guest session on the same phone
  • Catalogue items that are in stock, low in stock and out of stock, some with size and colour variants
  • Test coupons: one valid, one expired and one with a minimum cart value
  • Known serviceable and non-serviceable PIN codes, and a test admin panel for prices and stock
  • A 3–4 GB RAM Android phone, an iPhone and a desktop browser
Show
Add to a test plan

Happy path9

CRT-01

Add an in-stock item to an empty cart

P1functional
  1. Open the product page of an in-stock item
  2. Tap Add to cart
  3. Open the cart from the cart icon

Expected: The cart icon shows 1 and the cart lists the item with its image, name, variant, price and quantity 1. The subtotal equals the item price.

CRT-02

Increase and decrease quantity with the stepper

P1functional
  1. Add an item priced at ₹499 to the cart
  2. Tap + twice on the cart line
  3. Tap − once

Expected: The quantity reads 3 and then 2, and the line total and subtotal show ₹1,497 and then ₹998 without a full page reload.

CRT-03

Remove one of two items from the cart

P2functional
  1. Add two different items to the cart
  2. Tap Remove on the first item and confirm
  3. Check the subtotal and the cart icon count

Expected: Only the first item is removed, the subtotal drops by exactly its line total and the cart icon count goes down by one.

CRT-04

Add two variants of the same product

P1functional
  1. Open a T-shirt product page
  2. Select size M in blue and tap Add to cart
  3. Select size L in black and tap Add to cart
  4. Open the cart

Expected: The cart shows two separate lines, each with its own size, colour, image and price. Neither variant overwrites the other.

CRT-05

Apply a valid coupon in the cart

P1functional
  1. Add items above the coupon's minimum cart value
  2. Tap Apply coupon and enter the valid test code
  3. Tap Apply

Expected: A success message names the coupon, a discount line appears and the total drops by exactly the stated discount.

CRT-06

Move an item to Save for later and back

P2functional
  1. Add two items to the cart
  2. Tap Save for later on one item
  3. Open the Saved for later list and tap Move to cart

Expected: While saved, the item is left out of the subtotal and the cart count. After moving back, it returns with the same variant.

CRT-07

Check delivery for a serviceable PIN code

P2functional
  1. Open a cart with two items
  2. Tap Check delivery and enter a serviceable six-digit PIN code
  3. Tap Check

Expected: Each item shows a delivery date or date range for that PIN code, and the PIN code is still shown when you come back to the cart.

CRT-08

See the same cart on a second device

P2functional
  1. Log in on phone A and add three items with different variants
  2. Log in with the same account on phone B or a desktop browser
  3. Open the cart on the second device

Expected: The second device shows the same three items with the same variants, quantities and subtotal.

CRT-09

Guest cart merges into the account cart on login

P1functional
  1. Log in, add item A in size M, then log out
  2. As a guest, add item A in size M and item B
  3. Log in with the same account and open the cart

Expected: The cart shows item A size M once, with quantities combined by the app's rule and capped at stock, plus item B. No guest item is lost.

Validation & negative7

CRT-10

Select an out-of-stock size

P2negative
  1. Open a product whose size L is out of stock
  2. Tap size L

Expected: Size L is marked unavailable and Add to cart is disabled or replaced by Notify me. Nothing is added to the cart.

CRT-11

Go past the per-order quantity limit

P2negative
  1. Add an item that has a configured maximum quantity per order
  2. Tap + until the limit is reached
  3. Tap + once more

Expected: The quantity stops at the limit and a message states the maximum allowed. The subtotal does not change on the extra tap.

CRT-12

Enter a quantity above stock, zero or blank

P2negative
  1. Add an item with only 3 units in stock
  2. Type 10 in the quantity field and confirm
  3. Clear the field, or type 0, and confirm

Expected: 10 is capped at 3 with a message about limited stock. Zero or blank either asks to remove the item or restores 1, and no line ever shows quantity 0.

CRT-13

Apply an expired coupon

P2negative
  1. Add items to the cart
  2. Enter the expired test coupon and tap Apply

Expected: An inline message says the coupon has expired. No discount line appears and the total is unchanged.

CRT-14

Cart drops below a coupon's minimum value

P1negative
  1. Apply a coupon that needs a minimum cart value
  2. Remove or reduce items until the subtotal is below that minimum

Expected: The discount is removed straight away with a message showing how much more to add. The total is recalculated without the discount.

CRT-15

Enter malformed and non-serviceable PIN codes

P2negative
  1. Tap Check delivery
  2. Enter 12345, then 000000, then paste text containing letters
  3. Enter a valid but non-serviceable PIN code

Expected: Five digits, 000000 and letters are rejected with a format message. The non-serviceable code marks each affected item as not deliverable to that PIN code.

CRT-16

Proceed to checkout with an undeliverable item

P1negative
  1. Set a PIN code where one cart item cannot be delivered
  2. Tap Proceed to checkout

Expected: The app flags the undeliverable item and offers to remove it or save it for later. Checkout does not start with that item silently included.

Edge cases7

CRT-17

Price changes while the item sits in the cart

P1edge
  1. Add an item and note its price
  2. Raise its price in the test admin panel, or wait for a sale price to end
  3. Reopen the cart

Expected: The cart shows the new price with a notice such as Price increased by ₹50, and the subtotal uses the new price.

CRT-18

Last unit sells out while it is in your cart

P1edge
  1. On account A, add the last unit of an item to the cart
  2. On account B, buy that unit
  3. Reopen account A's cart

Expected: The item is marked Out of stock and left out of the subtotal. Proceed to checkout asks to remove it or moves it to Save for later.

CRT-19

Applied coupon expires before the cart is reopened

P2edge
  1. Apply a test coupon that expires within the hour
  2. Close the app and reopen it after the expiry time
  3. Open the cart

Expected: The coupon is shown as expired and removed, and the total returns to the undiscounted amount before checkout.

CRT-20

Variant is delisted while in the cart

P2edge
  1. Add the red variant of a product to the cart
  2. Delist the red variant in the test admin panel
  3. Reopen the cart

Expected: The line shows the variant as unavailable with options to pick another colour or remove it. It is never silently swapped for another variant.

CRT-21

Add the same item from two logged-in devices at once

P2edge
  1. Log in with the same account on two phones
  2. Add the same variant on both phones within a few seconds
  3. Refresh the cart on both phones

Expected: Both phones show a single line whose quantity follows the app's rule and stays within the quantity limit. The totals match on both.

CRT-22

Detect the PIN code from current location near a boundary

P2edgereal phone
  1. Stand near the edge of two PIN code areas
  2. Tap Use my location in Check delivery and allow location access
  3. Compare the detected PIN code with your postal PIN code

Expected: The app shows the detected PIN code and lets you edit it before checking. A wrong guess can be corrected without leaving the cart.

Why a real phone: Needs a real GPS fix; accuracy near PIN code boundaries cannot be mocked meaningfully.

CRT-23

Delivery estimate on a phone set outside IST

P3edge
  1. Set the phone's time zone to US Pacific
  2. Check delivery for a serviceable PIN code late in the evening, IST
  3. Compare the date shown with a phone set to IST

Expected: Both phones show the same delivery date. The estimate does not shift by a day because of the phone's time zone.

Interruptions & network4

CRT-24

Tap Add to cart on a slow 2G connection

P2interruptionreal phone
  1. Switch the phone to 2G, or stand where the signal is weak
  2. Tap Add to cart once, then again quickly
  3. Open the cart once the request completes

Expected: The button shows a loading state and ignores the second tap. The cart holds exactly one unit, or shows a retry message if the add failed.

Why a real phone: Real carrier latency and packet loss expose double adds that uniform emulator throttling misses.

CRT-25

Change quantity while Wi-Fi hands over to mobile data

P2interruptionreal phone
  1. Open the cart on Wi-Fi
  2. Tap + on an item and immediately turn Wi-Fi off
  3. Wait for mobile data to connect and refresh the cart

Expected: The new quantity is saved once the connection returns, or reverts with an error message. After refresh, the quantity shown matches the saved one.

Why a real phone: The Wi-Fi to Jio, Airtel or Vi data handover drops in-flight requests unpredictably.

CRT-26

Edit the cart inside a lift or metro dead zone

P2interruptionreal phone
  1. Open the cart on mobile data
  2. Enter a lift or an underground metro stretch
  3. Remove one item and change another item's quantity
  4. Return to coverage and refresh the cart

Expected: The app shows an offline or retry message instead of an endless spinner. After refresh, the cart matches what the app last confirmed, with no phantom removals.

Why a real phone: Dead zones leave requests hanging, unlike aeroplane mode, which fails them instantly.

CRT-27

App is killed in the background after a cart change

P2interruptionreal phone
  1. On a 3–4 GB RAM phone, change an item's quantity in the cart
  2. Switch to the camera and two or three heavy apps
  3. Return to the shopping app from recent apps

Expected: The app reloads without losing the cart, shows the changed quantity and does not duplicate any line.

Why a real phone: Low-RAM phones kill background apps aggressively; emulators rarely reproduce this system kill.

Device & OS4

CRT-28

Scroll a 40-item cart on a budget Android phone

P2performancereal phone
  1. On a 3–4 GB RAM phone, add 40 items with images to the cart
  2. Scroll quickly from top to bottom and back
  3. Change the quantity of the last item

Expected: Scrolling stays smooth without blank image tiles or the app restarting, and the last item's quantity and the subtotal update.

Why a real phone: Frame drops and memory pressure only appear on real budget hardware with slow storage.

CRT-29

Cart refreshes after a battery saver blocked background data

P2compatibilityreal phone
  1. On a Xiaomi, Realme or Vivo phone, turn on battery saver and close the app
  2. Add an item to the same account's cart from a desktop browser
  3. Open the app on the phone and check the cart

Expected: On opening, the cart and the cart icon count show the item added on desktop without a manual refresh.

Why a real phone: Each OEM Android skin restricts background data and app restarts differently.

CRT-30

Open a shared product link and add it to the cart

P2compatibilityreal phone
  1. Send yourself a product link in a messaging app
  2. Tap the link with the shopping app installed and logged in
  3. Pick a variant and tap Add to cart

Expected: The link opens the product inside the app, not a logged-out browser page, and the item lands in the logged-in account's cart.

Why a real phone: App link handling differs across OEM skins, default browsers and messaging apps' in-app browsers.

CRT-31

Tap a price-drop or cart reminder notification

P3compatibilityreal phone
  1. Leave an item in the cart with notifications allowed
  2. Lower its price in the test admin panel, or wait for the reminder
  3. Tap the notification when it arrives

Expected: The notification arrives and opens the cart or the product with the current price, not the home screen.

Why a real phone: Push delivery depends on OEM battery settings and whether the app was killed.

Security & privacy2

CRT-32

Log out, then open the cart as a guest and as another user

P1security
  1. Log in as account A and add items, a coupon and a PIN code
  2. Log out and open the cart as a guest
  3. Log in as account B on the same phone and open the cart

Expected: The guest cart is empty after logout. Account B sees only its own cart, with none of account A's items, coupon or PIN code.

CRT-33

Session expires while items sit in the cart

P2security
  1. Log in and add items to the cart
  2. Leave the app idle until the session timeout your app sets has passed
  3. Tap Proceed to checkout

Expected: The app asks you to log in again. After login, the cart still holds the same items, variants and quantities.

Accessibility & language3

CRT-34

Use the cart with TalkBack and VoiceOver

P2accessibilityreal phone
  1. Turn on TalkBack on Android or VoiceOver on an iPhone
  2. Move focus through a cart line, its quantity stepper and Remove
  3. Double-tap the increase button

Expected: The reader announces the item name, variant, price and quantity, labels buttons such as Increase quantity, and announces the new quantity.

Why a real phone: VoiceOver is not available in the iOS simulator; it needs a real iPhone.

CRT-35

Cart at the largest font and display size

P2accessibility
  1. Set font size and display size to the largest in phone settings
  2. Open a cart with long product names and a coupon applied

Expected: Names wrap instead of overlapping, prices and the quantity stepper stay readable, and Proceed to checkout is fully visible.

CRT-36

Cart in Hindi with a subtotal above one lakh

P2localization
  1. Switch the app language to Hindi
  2. Add items totalling more than ₹1,00,000, including one out-of-stock item
  3. Read every label, message and amount in the cart

Expected: Labels, stock and coupon messages appear in Hindi without truncation, and amounts use Indian grouping such as ₹1,24,500.

In the field

Where shopping cart breaks on real phones

  • Prices and stock are cached on the phone, so a cart reopened after a few days shows an old price and the shopper meets the real total only at payment.
  • Guest carts live on the device and are dropped or duplicated at login, especially when reading the OTP SMS sends the app to the background on a low-RAM phone.
  • On Xiaomi, Realme and Vivo phones with battery saver on, the app restarts from scratch and the cart icon count no longer matches the cart.
  • On patchy 4G that falls back to 3G or 2G, Add to cart looks unresponsive, shoppers tap again, and the cart ends up with two units.
  • A coupon stays applied after items are removed and the cart drops below the minimum value, and the error appears only at checkout.
  • Location-based PIN code detection picks a neighbouring PIN code in dense areas and marks deliverable items as not deliverable.

Run these 36 cases on real phones

They fit the Standard package: 10 × 45-minute sessions on 4 phones or browsers of your choice, up to ~50 cases, ₹18,999 + GST ($249), verified report in 3 business days. The 10 P1 cases alone fit Starter (₹9,999 + GST).

Download the CSV, pick the package at checkout and upload the file with your build. Testers run them on their own phones, on Jio, Airtel and Vi.

Questions

About testing shopping cart

Should a cart update prices automatically when the seller changes them?

Yes, the cart should always show the current price and flag any change since the item was added, so the shopper is not surprised at payment. Test it by changing a price while the item sits in a cart, then reopening the cart on a phone and on the web. The subtotal, coupon eligibility and any free-delivery message should all use the new price.

How do you test guest cart merge on login?

Add items as a logged-in user, log out, then add more items as a guest, including one variant that is already in the account cart. Log in again and check that no item is lost, that the shared variant appears once with a sensible quantity, and that stock and quantity limits still apply. Repeat with OTP login on a slow phone, where reading the SMS can send the app to the background.

Which cart test cases need a real phone rather than an emulator?

Cases that depend on the network, the phone's memory or the maker's battery settings: duplicate adds on a slow connection, carts edited in a lift or metro, the app being killed in the background on a 3–4 GB RAM phone, and sync after a battery saver. GPS-based PIN code detection, notifications, shared links and VoiceOver also need real hardware. Field validation and coupon rules can be checked on an emulator or a desktop browser.

Related flows

Test these next

Your AI wrote the test cases. Run them on real phones.

99tests runs your cases, AI-generated ones included, on the phones, laptops and browsers your users own. Every finding is verified, serious bugs come with a screen recording, and each case comes back pass, fail, blocked or not run.