Testing a store
This page is for developers, agencies and merchants who must be sure a store works before customers find out it does not. It gives a test plan in the order a customer meets the store, plus the setup that keeps tests safe. The short launch list for owners is Store launch checklist; this page is the full plan behind it.
Contents
A safe test environment
- Test on a copy of the site, not on the live store, whenever you can (Develop with Git, Backups and restores).
- Put every payment provider in its test mode:
paypal.ini [ServerSettings]pointing at the sandbox, orezauthorize.ini TestMode=true(paymentgateways.ini walkthrough). - Stop real mail:
site.ini [MailSettings] Transport=filewrites mails to files instead of sending them. Check which value is in effect, because an override file may set another transport (Shop settings walkthroughs). - Use test customer accounts with addresses on reserved domains such as
example.invalid, never real customers' addresses or data. - The provider's callback must reach the test site; a test site behind a login or VPN cannot receive it.
Test data
| Item | Prepare |
|---|---|
| Products | One per class, one with options, one without a price, one unpublished |
| VAT | One product per product category; customers for each country with a rule and one without |
| Currencies | One order per currency you sell in |
| Customers | A guest, a registered customer, a member of each discount group, a staff user per role |
The plan
Catalog
- To do: Every product class shows a price and the add-to-basket form.
- To do: Store > Products overview lists all products of each class with prices.
- To do: Content without a price field cannot be added to the basket (the kernel cancels the add), and products with an empty price are caught by the dashboard's "products without a price" figure.
Basket
- To do: Add, change quantity, remove; zero and invalid quantities give an error.
- To do:
RedirectAfterAddToBasketbehaves as decided. - To do: Change a product's price while it is in a basket: on checkout the item is removed and listed as removed (Checkout operations step by step).
Customer data and confirmation
- To do: Guest and signed-in checkout reach the confirmation page.
- To do: Shipping and VAT are right for each test country and product category.
- To do: Discounts apply to the right groups only (Discounts).
- To do: Cancel returns to a full basket; reloading the page does not add shipping twice.
Payment
- To do: Successful payment: order placed with a number, status as configured, mail in the test mailbox.
- To do: Cancelled payment: no placed order, the basket is back, retry works.
- To do: Refused card or failed payment: a clear message.
- To do: Gateway selection, when several gateways are selected.
Orders and staff
- To do: Each staff role sees exactly the screens and status changes it should (Status transitions and permissions).
- To do: Archive and unarchive; the dashboard figures change as expected.
Receipts and mail
- To do: The order mail's content and links; the receipt opens on another device without signing in, if receipts are on.
Accessibility and devices
- To do: The full path with a keyboard only and on a phone (Store accessibility).
What to automate
- Calculations in your own handlers: DB-less unit tests (DB-less PHPUnit tests).
- Repeatable flows: the repository's own tests for the commerce services
(
tests/tests/extension/expservices/commerce/) show how basket and order operations can be exercised from code (Testing applications). - Visual checks of product, basket and checkout pages after design changes.
After every update
Repeat the payment section and one full order per payment method after every Exponential or extension update, and after any change to shop settings or workflows (Upgrades without surprises).
Cleaning up
On a test copy, the shop cleanup script removes all baskets, wishlists and orders. On a live store, remove test orders one by one and never run that script (Archive, remove and cleanup). Switch providers back to live mode and mail back to the real transport, and place one small real order.
Related pages
- Operating a store
- Basket, checkout and orders: test order checklist
- Basket and checkout flow: test the path
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.