Testing E-Commerce websites regularly, I often get asked how to test the purchase flow. This is a delicate topic: It is vital for any shop owner that the purchase and payment flow of the shop runs smoothly. But, it involves real money – something alien to QA testing.
So, these are your options:
- Create a coupon for 100% discount and use this coupon in your test.
- Enable Invoice Payment (e.g. WooCommerce->Settings->Checkout->Cash on delivery).
- Use a stage environment and set your payment provider to sandbox mode (e.g. Paypal or Stripe).
- Use a real credit card during purchase flow. Refund after the test. This usually leaves you with remaining fees from the payment provider and can hurt your credit score. Make sure to use a separate card and talk to the payment provider that your refunds are part of tests.
Using the first two options, you can test many important steps of your purchase flow, except the payment itself. This is sufficient in most cases. Note:Make sure that the goods purchased are not sent out 🙂
If you already have a stage environment, option 3. is best. It tests much of the communication with the payment provider. Then, you can go to the payment provider’s website and check if the communication was correct, too.
The real test is option 4. With real money, you can do real testing of production shops. If you have a shop with low volume and your last payment was a few days ago, test using option 4 manually and verify that it’s not a technical issue.