WooCommerce: Checkout Test Automation 101

E2E Checkout Testing

Testing the WooCommerce checkout is extremely important for your ecommerce business.

Every time you install a new plugin or update WordPress you might run into issues: for example, the cart and payment pages could stop working until you fix the problem.

You don’t want to lose sales and undermine your website reputation, do you? So you must test all the WooCommerce processes on a regular basis, also called “end to end” (E2E) testing.

But how can you do that without wasting too time?

Spoiler alert: simply create an automated test, and let the robot test your WooCommerce website on a regular basis, so that you never have to worry about doing it manually.

Luckily for you, there are some great tools – such as the two you will soon read about – and WooCommerce professionals that can do it for you on a daily or whatever basis.

Here’s your quick introduction to setting up your checkout test automation.

Cheers to a checkout page that works 365 days a year.

Usetrace Test Automation Tool

Usetrace is an online software that analyzes your website in a few seconds through some very accurate tests.

You can automatize lots of different tests, including the WooCommerce checkout one. You simply have to create a trace of the activity you want to check and allow the Usetrace editor to interact with your store. 

The tool will record your actions and save them to schedule tests in the cloud following your traces. Usetrace will also automatically go through your website every time you update the WordPress core or add some new features, to make sure everything is working fine. 

If the tool finds something wrong, it will send you an email notification with all the instructions you need to fix the bug and restore your WooCommerce.

Ghost Inspector Test Automation Tool

Ghost Inspector is an online testing tool that uses a Chrome extension. To set it up, you need to follow these steps:

  • After you install the Ghost Inspector Chrome extension, open the website you want to test. Click on the toolbar icon at the top right in your browser to start recording a test;
  • Now buy something on your store so that the extension can record all of your actions;
  • Save your purchase and use it as a model to schedule all the tests you need;
  • If something goes wrong, you will get an email with a full video report of the test.

Ghost Inspector is very useful to create different kinds of tests on the same website, but you may need some time to learn how to use it properly.

Case Study: How We Test Our Clients’ Checkouts

WP-OK specializes in WordPress and WooCommerce support for all kinds of businesses. Whenever we have to run functional tests, we always use Ghost Inspector.

We test our clients’ checkout process twice a day, following these steps:

  1. Open the website homepage;
  2. Click on the Shop page;
  3. Click on a product;
  4. Add it to the cart;
  5. Proceed to the checkout;
  6. Insert personal information;
  7. Complete the purchase without checking the terms & conditions box;
  8. The checkout page should now show an error for the missed checkbox.

With this simple test we manage to detect and identify 90% of the issues.

You may wonder why we don’t actually complete the purchase? Well, there are a couple of reasons for that.

First of all, we prefer not to complete the payment so we don’t have to ask for a refund (even if we could make that automatic too!) – that would somehow affect the billing, generate an invoice to void and a refund to handle. 

The second reason is that a fake purchase would compromise our clients’ sales conversion rates.

Troubleshooting Checkout Errors

Ghost Inspector creates a video report after each test and runs a screenshot comparison to recognize possible changes in the pages.

A test can fail for two reasons:

  • functionality error: one of the test steps is not working (e.g. the add to cart button is missing and the system can’t add a product to cart);
  • visual error: the loaded page is different from the screenshot of that page from the first successful test (e.g. the footer is missing).

When a test fails you need quick technical support to understand what’s going on.

Sometimes you may experience a false-positive error after you edited a page. It may also happen that the tested product is out of stock, or no longer available on the website.

Checking the test results is a crucial step for your WooCommerce site, especially when you are new to this kind of analysis. It’s really important that you take your time to set up an automated E2E test and analyze its findings.

Recap

Setting up an automated test for your WooCommerce checkout is not only a great idea, but also a great way to avoid errors and save on customer support time.

Ghost Monitor is quite easy to set up and can do pretty complex E2E tests, hence taking action today and moving to the next level is a no-brainer.

Related content

  • WooCommerce: Cart and Checkout on the Same Page
    This is your ultimate guide – complete with shortcodes, snippets and workarounds – to completely skip the Cart page and have both cart table and checkout form on the same (Checkout) page. But first… why’d you want to do this? Well, if you sell high ticket products (i.e. on average, you sell no more than […]
  • WooCommerce: Disable Payment Method If Product Category @ Cart
    Today we take a look at the WooCommerce Checkout and specifically at how to disable a payment gateway (e.g. PayPal) if a specific product category is in the Cart. There are two tasks to code in this case: (1) based on all the products in the Cart, calculate the list of product categories in the […]
  • WooCommerce: Add Privacy Policy Checkbox @ Checkout
    Here’s a snippet regarding the checkout page. If you’ve been affected by GDPR, you will know you now need users to give you Privacy Policy consent. Or, you might need customer to acknowledge special shipping requirements for example. So, how do we display an additional tick box on the Checkout page (together with the existing […]
  • WooCommerce: Redirect to Custom Thank you Page
    How can you redirect customers to a beautifully looking, custom, thank you page? Thankfully you can add some PHP code to your functions.php or install a simple plugin and define a redirect to a custom WordPress page (as opposed to the default order-received endpoint). This is a great way for you to add specific up-sells, […]
  • WooCommerce: Disable Payment Gateway by Country
    You might want to disable PayPal for non-local customers or enable a specific gateway for only one country… Either way, this is a very common requirement for all of those who trade internationally. Here’s a simple snippet you can further customize to achieve your objective. Simply pick the payment gateway “slug” you want to disable/enable […]

Daniele Besana

Daniele Besana is the founder of WP-OK, a company specialized in managing WordPress & WooCommerce websites. His goal is helping small and medium businesses with their website problems, so that they can stop wasting time and money.

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

8 thoughts on “WooCommerce: Checkout Test Automation 101

  1. Great article. I’m looking into both of these now.

    For me, most of the issues at checkout tend to happen with order creation / payment processing.

    How do you make sure you’re always aware when something comes up that prevents customers from paying?

    1. Not sure I completely follow your question, could you please expand on that?

  2. it would be nice to know the usetrace pricing, before signing up and getting sucked in on their site… i cannot even find it in their search. no need to reply to me…. just a comment, and i am not interested in their ‘free trial’

    1. Hey Frederic! I found this: https://usetrace.com/pricing/

  3. Got excited reading about usetrace and ghostinspector…unhappy that my non-profit can’t afford even the least expensive plans. Any other alternatives for testing woocommerce on WordPress?

    1. Sorry about that. Coders can also check https://developer.woocommerce.com/2017/03/30/end-to-end-testing-woocommerce/ but either way there is some time (or money) to invest in making this work

  4. A few points I picked up with the final steps in the process.
    1. I’ve seen fatal errors triggered with the same response as the checkout error from a failure to check the checkbox. This could generate a false positive by relying on not checking the checkbox as the check.
    2. Not all sites use a checkbox. In fact, don’t they harm conversion rates?
    3. The point about affecting the clients conversion rates is odd. Initiating a checkout will still screw with the conversion rate.
    In reality the conversion rate is going to have to be messed with, it’s unavoidable. My preferred method is to use paypal as the payment method and if I get to paypal and can see the value at paypal then the checkout is working and I cancel. Granted, not all sites use paypal either, but it’s a more rounded method for checking

    1. Great feedback!

Leave a Reply

Your email address will not be published. Required fields are marked *