# How to Test Promotions and Discount Codes with AI

> Check that discount codes, automatic promotions and free-delivery thresholds reach the total shoppers pay, from the campaign page to the payment step, in every market.

Source: https://qa.tech/use-cases/promotion-discount-testing

---
Write the offer as a shopper's goal with the price you expect, for example "as a guest in Germany, buy two of the same jacket with code SAVE10 and reach payment; the total is 10% lower and in euros". The agent applies the code or triggers the offer, reads the total at every step and fails the test where the discount doesn't reach it. In our November 2026 test of 72 European online stores, 7 had a confirmed price or discount mismatch and 5 charged delivery on an order that met their free-delivery threshold.

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

Sub-use-cases

**Covers** Valid and invalid codes, automatic and tiered offers, stacking rules, minimum spend, free-delivery thresholds and [campaign pages and banners](https://qa.tech/use-cases/peak-season-testing).

1.  01
    
    ## What promotion testing should cover
    
    Codes that should work and codes that shouldn't: expired, made up, below the minimum spend or used twice. Automatic and tiered offers like "25% off from two items", stacking rules between codes and sale prices, free-delivery thresholds against the delivery line at checkout, and the campaign pages and banners that promise the offer.
    
2.  02
    
    ## How does AI test a promotion?
    
    The agent goes through the promotion as a shopper would, from the campaign page to the payment step, and checks the discount line and the total on each page. Run the same goal once per market with a device preset that [browses from that country](https://docs.qa.tech/test-features/device-presets#browse-from-locale-and-timezone), because an offer set up for one currency is often missing or wrong in another. Put the expected numbers in the goal, since the agent checks the screen against them and knows nothing of your promotion engine's rules.
    
3.  03
    
    ## When to test promotions
    
    Before every campaign goes live, on every change to the promotion engine or pricing code, and on a schedule while the campaign runs. Offers change more often than any other part of a store, so a large scripted suite of discount cases goes out of date quickly. Test the offers that are live now and the ones about to go live.
    
4.  04
    
    ## Who needs promotion testing
    
    Retailers that run frequent campaigns, tiered or bundle offers, or different promotions per market, and teams whose promotion logic lives in custom code or a separate promotion service.
    
5.  05
    
    ## How QA.tech helps
    
    A promotion bug looks correct on the page that shows it. One store we tested displayed a product discount of −382 € while the order total stayed at 379,98 €. Another promised free delivery over £80 and charged £10.99 on a £98 basket. The agents read the number the shopper pays, the total at checkout, so cases like these fail.
    

FAQ

## Common questions

Can the agent test a discount code that should fail?

Yes. Give the code and the expected outcome, such as an error message and an unchanged total. The test fails if the store accepts the code.

Can it test automatic promotions with no code?

Yes. Describe the condition, such as buying two items, and the price you expect. The agent builds the basket and checks the total on every step.

Why test free-delivery thresholds?

Because unexpected costs at checkout are the top reason shoppers abandon: 40% of shoppers in [Baymard Institute's research](https://baymard.com/blog/reduce-cart-abandonment) left over extra costs such as delivery.

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

Product Page & Variant Testing

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

Pull Request & CI/CD Testing

](https://qa.tech/use-cases/pr-cicd-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)
