# How to Test a Shopping Cart and Price Consistency with AI

> Test the cart the way shoppers break it: change quantities, remove and re-add items, reload, and check the price matches on the product page, cart, checkout and email.

Source: https://qa.tech/use-cases/shopping-cart-testing

---
You give a testing agent a shopper's goal and the totals you expect, and it works the cart like a real customer. It adds products, changes quantities, removes and re-adds items and reloads the page, then compares the price on the product page, mini-cart, cart and checkout. A total that drifts between two of those steps fails the test. Of the 72 European online stores we tested in November 2026, 8 had a confirmed cart bug and 7 showed a different price for the same item on different steps.

[Book a demo](https://qa.tech/demo)[Get Started for Free](https://app.qa.tech/auth/sign-up)

Sub-use-cases

**Covers** Price on every step, quantity edge values, remove and re-add, cart after reload or sign-in, mini-cart vs cart, stock and variant changes and [carts restored from email links](https://qa.tech/use-cases/order-email-testing).

1.  01
    
    ## What a cart test should cover
    
    Quantity changes, including 0, the per-customer limit and very large numbers. Removing and re-adding items, the cart after a reload and after signing in, and the same price on the product page, mini-cart, cart, checkout and order email. Stock or variant changes while the item sits in the cart, and the cart a shopper finds when they come back from an email link.
    
2.  02
    
    ## How does AI test a shopping cart?
    
    The agent [crawls](https://docs.qa.tech/core-concepts/crawling) the store, then runs each goal in a real browser, reading the totals on screen at every step and recording screenshots and network traffic. Agents aren't built for long calculations, so put the expected total in the goal ("two of item X at 249 kr is 498 kr") and test complex tax rules with scripts ([when to use agents or scripts](https://docs.qa.tech/getting-started/faq#when-to-use-ai-agents-vs-scripts)). Goals describe what the shopper does and leave the clicks to the agent, so a redesigned cart rarely breaks them while a wrong total still fails.
    
3.  03
    
    ## When to test the cart
    
    On every change to the cart, pricing, promotions or the services behind them, tested on the preview deployment before merge or on staging right after. Keep a short scheduled run of the two or three cart journeys you can't afford to lose, and run it daily against production during campaigns.
    
4.  04
    
    ## Who needs shopping cart testing
    
    Stores where prices come from more than one place: a search index for listings, the commerce engine for the cart and a promotion service for discounts. That covers most headless and composable builds, and many platform stores with heavy customisation.
    
5.  05
    
    ## How QA.tech helps
    
    Cart bugs rarely throw an error. One store we tested accepted a quantity of 9999 and showed a cart total of 2,589,741 kr, and another let a product limited to two per customer reach 498 units. The agents try inputs like these on purpose and compare totals at every step, so the mismatch turns up in a test run with a screenshot of the step where the total changed.
    

FAQ

## Common questions

What is price consistency testing?

Checking that an item shows the same price, discount and currency on the product page, mini-cart, cart, checkout and order email. Each of those pages can compute its own total, so each one can be wrong on its own.

Can the agent check the total after every change?

Yes. Describe the steps and the expected total, and the agent reads the total on screen after each change and after a reload. The test fails at the step where it differs.

Does a cart test place real orders?

No. In production, cart tests usually stop at the payment step. Full purchases run on staging with your payment provider's test mode, as described in [checkout flow testing](https://qa.tech/use-cases/checkout-flow-testing).

Related use cases

-   [
    
    Analytics & Tracking Event Testing
    
    An AI agent completes the real user flow in a browser – a checkout, a signup, a form submit – then verifies the tracking request actually fired: URL pattern, method, status code, and the payload it carried. The purchase beacon with the wrong revenue value fails the test, before it fails the month-end numbers.
    
    Read ░░ ▒▓▒▓▒░░ ▒█▒▒░█▓ ▓▓▒▒░ ░ ░░ ░░ ░ ░ ░ ▓▒▒░▓▓▓░ ░░ ░ ▒▒░▒░▒░ ░ ░░▒ ░▓ ░ ░ ░ ▒░ ▒ ░ ▓▒▓ ░██ ▒░▒░▒ ░░▓░▓░░░▓░▓░ ▒░](https://qa.tech/use-cases/analytics-tracking-testing)
-   [
    
    Authentication & Login Flow Testing
    
    An AI agent runs your real login journeys – including the parts traditional tools can't, like opening an email or reading an SMS code – and verifies the user ends up authenticated. QA.tech gives the agent its own inbox and phone number, so magic links, one-time passwords and confirmation emails are tested end to end, not mocked. See how Upsales replaced 320 hours of manual testing a month with this approach.
    
    Read ░░▓ ░ ▓░▒ ▒ ░▒ ▒▓ ▓ ░░ ▒▓ ░▓░▒░ ▒▓▒░░░░ ▒█ ░ ░ ▓░▒░ ▒ ▓ ▓▓ ░ ░ ░░░ ▓▓▓▒ ░ ░░▓░▓░░█ █░▒░░ ░▓▓░░ ░░▒░░░ ░░ ▓ ░ ▒](https://qa.tech/use-cases/authentication-testing)
-   [
    
    Black Friday & Peak-Season Testing
    
    Run an exploratory review of the whole store a few weeks before the campaign, fix what it finds, then schedule short checks on checkout, offers and emails for the campaign itself. We ran the first part on 72 European online stores the week before Black Friday 2026, starting from one prompt: "can you go around and check for general issues that could affect my users during black friday?" Of those, 33 had a confirmed bug.
    
    Read ░█░▒ ░▓▒░▒ ░░ ▒░▒ ▒▒▒▓ ▒░░ ░▓░ ░▒ ▒ ▓█▓░░░▒░░░ ░▓ ▒░░░ ▒▒░░░░░ ▒ ░ ▒▒░ ░░░▒▒ █░░▒░ ░░ ░ ░░ ░░ ░ ░░ ░ ▒](https://qa.tech/use-cases/peak-season-testing)

[← Previous

Shift-Left Developer Testing

](https://qa.tech/use-cases/shift-left-testing)[Next →

Smoke Testing

](https://qa.tech/use-cases/smoke-testing)

## Your team moves fast. Can your testing keep up?

Our QA agents test your product autonomously, so moving fast never means shipping broken. Start free or get a 30-minute demo.

[Get started for free](https://app.qa.tech/auth/sign-up)[Book a demo](https://qa.tech/demo)
