Skip to content

USE CASE · ONLINE STORES

E-commerce testing with AI: protect checkout, cart and search

Updated · 4 min read · By the TestOptim AI team

Short answer

E-commerce testing checks that shoppers can find a product, add it to the cart, pay and see the right order, and that prices and totals are always correct. An AI QA agent covers this by exploring the store like a shopper, trying wrong quantities, codes and addresses, and reporting any flow that breaks or any total that is wrong.

  • Money bugs come first: wrong prices, totals, discounts or taxes are critical severity.
  • Most store bugs are in negative paths: invalid codes, zero or huge quantities, expired sessions.
  • Test on a staging store with a payment provider's test mode, never the live checkout.

What e-commerce testing should cover

Core flows in e-commerce testing and the bugs to look for
FlowWhat can go wrong
Search and filtersNo results for obvious terms, filters that ignore each other, sorting by price that is not sorted
Product pageOut-of-stock items still purchasable, wrong variant price, missing images
CartQuantity of zero or a negative number accepted, totals that do not update, items lost after sign-in
Discount codesExpired or invalid codes accepted, codes stacking when they should not
CheckoutRequired address fields missing validation, double submit creating two orders, back button emptying the form
Account and ordersOrder history showing another customer's order, password reset that fails

Write down the business rules the agent cannot guess, such as whether codes may stack or which countries you ship to. A failure is only a bug if it breaks a rule you hold.

Why e-commerce testing suits an AI agent

A store has a handful of flows but thousands of combinations of products, quantities, codes and addresses. Hand-written scripts usually cover one happy checkout. An agent writes at least two negative cases and an edge case for every flow it finds, which is where store bugs live.

In our blind benchmark on a live store, TestOptim generated 446 executable test cases against 35 from a one-shot AI coding agent given the same app, scored blind by an independent judge.

TestOptim's agent is instructed to rate a wrong total or charge, or a fully blocked checkout, as critical, so money bugs reach the top of the list and can fail your build through the CI integration.

Running e-commerce testing safely

  • Use a staging store with your payment provider in test mode, so test orders are never charged or shipped.
  • Create a test customer account and add it as a credential profile. To test the back office, add a store admin profile and explore as it; test runs use the default profile.
  • If your staging store sits behind Cloudflare, let TestOptim through so the agent is not blocked as a bot.
  • Schedule a nightly run and a run on every deploy, so a pricing change cannot quietly break totals.

Never point the agent at a live checkout. It submits the forms it finds, so it would place real orders.

E-commerce testing checklist before a sale or launch

Promotions and seasonal sales are when stores change the most and can least afford a broken checkout. Before each one, run through this list on staging, or have the agent do it on a schedule:

  • Every new discount code applies once, to the right products, and is refused after it expires.
  • Sale prices show the same amount on the listing, the product page, the cart and the order confirmation.
  • A shopper can check out as a guest and as a signed-in customer.
  • Shipping options and costs change correctly with the address.
  • Out-of-stock variants cannot be added to the cart.
  • A failed card payment leaves the cart intact and shows a clear message.
  • The order confirmation page and email show the correct items and total.

The agent cannot read the confirmation email, so check that one item by hand. Everything else on the list is a browser flow TestOptim explores and re-tests on every run.

Frequently asked questions

What is the most important thing to test in an online store?

Checkout and the numbers on it. A shopper must be able to pay, and the item prices, discounts, shipping, tax and total must be right. A wrong total either loses you money or loses the customer's trust, so treat any pricing bug as critical.

Can an AI agent test checkout without making real payments?

Yes, if you point it at a staging store with your payment provider in test mode. The agent uses the test card your payment form shows in test mode, or a standard test card number, and no real money moves. Never run it against your live checkout.

Does AI e-commerce testing work with Shopify or WooCommerce stores?

TestOptim tests any store that runs in a web browser, because it uses the store's pages rather than its code. A Shopify, WooCommerce or custom storefront is tested the same way: give it the store URL and a test customer login.

How often should an online store be tested?

After every change to prices, promotions, themes, apps or checkout settings, and on a schedule such as nightly. Third-party apps and theme updates often change checkout without a code deploy, so a scheduled run catches what a deploy-triggered run would miss.

What is the difference between e-commerce testing and checkout testing?

Checkout testing covers only the steps from cart to order confirmation. E-commerce testing covers the whole store: search, filters, product pages, cart, discount codes, accounts, order history and checkout. Most revenue bugs show up in checkout, but many start earlier, such as a wrong price on a product page.

Can TestOptim test a store's admin back office?

Yes, if the back office runs in a browser and you give it a staging admin account. Add the account as a credential profile and explore as it. Test runs sign in with the default profile, so a separate project for the back office keeps its tests running as the admin. Use a staging store, because the agent submits forms and would change real products, prices or orders.

More AI QA testing guides

GET STARTED FREE

Find the bugs before your users do

3-day free trial · No code or test scripts · 3-day Solo trial, then $19–$149/mo self-serve