Test case examples
Complete Testmode test cases for common flows, each one run for real on an online store: categories, search, sorting, paging, product pages, cart rules, coupons, validation, footer links, signed-in pages, signing out and a full checkout.
Every example on this page is a test case run against Cobble & Pine, an outdoor-gear web store we built for our own testing. Each one ran and passed as shown on the store’s production environment; the last section shows what one of them does on staging, where a release broke it. Copy them as a starting point, then swap in your own labels.
Two of them use project variables: {{Coupon Code}} is WELCOME10 and {{Guest Email}} is casey.morgan@example.com. Two sign in first, with the logins Alex Rivera, a customer with an order history, and Jordan Lee, a new customer. See Variables and Logins and automatic sign-in.
Browse a category
Section titled “Browse a category”1. Click "Tents & Shelter" in the categories.
Expected outcome: Only tents and shelters are listed, including "Ridgeline 2P Tent" and "Featherlite Tarp Shelter", under the heading "Tents & Shelter".Why it works: the outcome says what must be on the page and what must not, and names the heading that proves the right page opened. PASSED
Search
Section titled “Search”1. Type "tent" in the search box and press Enter.
Expected outcome: The search results include "Ridgeline 2P Tent".Why it works: the search term is in lower case on purpose, and the outcome names one product a working search must find. PASSED
Sort a list
Section titled “Sort a list”1. In "Sort by", choose "Price: low to high".
Expected outcome: The first product listed is "Camp Spork Set" at $6.95 and prices increase down the list.Why it works: “prices increase down the list” is something Testmode can check by reading the page, and the cheapest product pins the start of the order. PASSED
Page through a filtered list
Section titled “Page through a filtered list”1. Click "Next" in the pagination below the products.
Expected outcome: Page 2 still shows the Clothing heading and lists only clothing, such as "Cascade Beanie", and no tents, boots or packs.Why it works: the start path opens the category with its filter in the address, and the outcome checks that the filter survived the second page. PASSED
A product photo
Section titled “A product photo”1. Verify the page heading is "Alpine Down Jacket".
Expected outcome: A photo of the Alpine Down Jacket is shown, not a broken image.Why it works: the look is described in words Testmode can read on the page, and the step makes sure the right product opened. PASSED
Add to the cart
Section titled “Add to the cart”1. Choose size "M".2. Set Quantity to 2.3. Click "Add to cart".4. Open the cart from the header.
Expected outcome: The cart lists Trailhead Merino Tee, Size: M, quantity 2, and the subtotal is $90.00.Why it works: the start path opens the product’s page directly, each step does one thing, and the outcome checks the size, the quantity and the sum, which are what a customer pays for. PASSED
A business rule
Section titled “A business rule”1. Choose size "9".2. Click "Add to cart".3. Open the cart from the header.
Expected outcome: The cart shows a subtotal of $79.95 and Shipping: Free.Why it works: the product is chosen just above the store’s free-shipping threshold, so the test fails if the rule changes. PASSED
Totals that add up
Section titled “Totals that add up”1. Click "Add to cart".2. Open the cart from the header.
Expected outcome: The cart shows subtotal $29.95, shipping $6.95, tax $2.40 and total $39.30.Why it works: every amount is named, so a total that is off by a cent fails the test. PASSED
A coupon used twice
Section titled “A coupon used twice”1. Click "Add to cart".2. Open the cart from the header.3. Type {{Coupon Code}} into "Discount code" and click "Apply".4. Type {{Coupon Code}} into "Discount code" again and click "Apply".
Expected outcome: The cart says {{Coupon Code}} is already applied and shows a single discount of -$8.90.Why it works: it does what a customer might, applying the code twice, and checks both the message and that the discount was counted once. The code is a variable, so every test that uses it changes with it. PASSED
Something that must not be possible
Section titled “Something that must not be possible”1. Verify the page heading is "Granite Belay Gloves".
Expected outcome: The page says "Out of stock" and offers no enabled button to add the gloves to the cart.Why it works: the outcome says what must not be on the page. PASSED
Validation
Section titled “Validation”1. Click "Add to cart".2. Open the cart from the header.3. Change the quantity of Cascade Beanie to -1.4. Click "Update".
Expected outcome: An error says the quantity must be between 1 and 10, and the cart still has 1 Cascade Beanie with a positive total.Why it works: it checks the error and that the bad value was not kept. PASSED
A link in the footer
Section titled “A link in the footer”1. Click "Returns" in the footer.
Expected outcome: The page "Returns & exchanges" explains the 60-day return policy.Why it works: the outcome names the page’s heading and a fact on it, so a link to a “Page not found” fails. PASSED
A page behind a login
Section titled “A page behind a login”1. Click "Orders".
Expected outcome: The first order listed is CP-10263 with status Processing, followed by CP-10248 and CP-10231.Why it works: the login signs in before step 1, so there are no sign-in steps, and the test starts on the account page. The orders are named because they belong to a test account that only tests use. PASSED
Signing out
Section titled “Signing out”1. Click "Sign out".2. Go to /account.
Expected outcome: The sign-in page is shown, asking for an email and password.Why it works: it checks that the account page is closed after signing out, not only that the header changed. It has a login of its own, because signing out ends the sign-in for every test that shares it. PASSED
A full checkout
Section titled “A full checkout”1. Click "Add to cart".2. Open the cart from the header.3. Click "Checkout".4. Type {{Guest Email}} into "Email".5. Type "Casey Morgan" into "Full name", "200 SE Stark St" into "Address" and "Portland" into "City", choose "Oregon" in "State" and type "97214" into "ZIP code".6. Choose Standard shipping.7. Enter card number "4242 4242 4242 4242", expiry "12/30" and CVC "123".8. Click "Place order".
Expected outcome: The confirmation page thanks Casey and shows an order number starting with "CP-".Why it works: each step names the part of checkout it fills in, and the outcome checks the confirmation without naming an order number, which is new every time. It places a real order, so run it on staging, or on a store whose orders a test may place. PASSED
A real failure
Section titled “A real failure”The search example above, run on the store’s staging environment, fails: a release there made search case-sensitive, so “tent” finds nothing and the results page says no products match it. FAILED The run page shows the outcome that was not met and a screenshot of the page. This is the kind of failure a test exists to catch, and the steps need no change.