How to Test WooCommerce: Why End-to-End Testing is So Important

Have you ever made a minor change to your WooCommerce site and later discovered you inadvertently broke something? It might’ve been something as simple as adding a new product or updating a shopping cart setting. The problem is, when you don’t test WooCommerce and you break your store there’s a lot at stake – unhappy customers and lost revenue.

Unlike other websites, eCommerce stores require greater care and maintenance to ensure they perform seamlessly on the customer’s side. Stores are updated frequently, often several times a day – e.g. products running out of stock, updated payment settings, new sales items –  so it can be difficult to keep track of whether your store is fully functioning.

Then there are software updates – WordPress, theme, extension, and WooCommerce updates. ICYMI, WooCommerce 3.3 broke a lot of stores when it was recently released.

Simply trusting that your store is working isn’t a good strategy. As a store owner, it’s critical that you continually test WooCommerce end-to-end to ensure everything is in working order and customers are able to successfully checkout.

So in this post, I’ll cover what end-to-end testing is, why it’s important to test your store, and how to get started manually testing WooCommerce.

What is End-to-End Testing?

End-to-end testing, as we’ve covered on this blog before, is a technique used to test whether the flow of an application is behaving as expected from start to finish.

When it comes to eCommerce sites, there are several different kinds of tests you can perform including:

  • Functional Testing
  • Usability Testing
  • Security Testing
  • Performance Testing
  • Database Testing
  • Mobile Application Testing
  • A/B testing

In this post, we’re focusing on functional testing, i.e. how to test WooCommerce – does your WooCommerce store work as expected, allowing shoppers to add an item to the cart and complete checkout.

An end-to-end functional test for a WooCommerce site might include the following:

  1. Checking your store’s homepage loads
  2. Checking that product pages load properly
  3. Adding product/s to the shopping cart
  4. Checking the shopping cart loads properly
  5. Checking the checkout loads properly
  6. Checking that customers can checkout as a guest
  7. Checking that new customers can register and login at checkout
  8. Checking that existing customers can login at checkout
  9. Checking that existing customers can make a purchase
  10. Testing that the payment process works properly
  11. Testing that customers can complete the checkout process

For more on end-to-end testing, Matt Allan has written an excellent post: Getting Started with End-to-End Testing for WooCommerce. Matt covers end-to-end testing in-depth, its benefits, how WooCommerce uses it, and the current WooCommerce end-to-end tests.

Why You Need to Test WooCommerce End-to-End

Online stores have a lot of moving parts. Whether you’re updating extensions or configuring checkout settings, something’s bound to break sooner or later – and often without you knowing about it until you’ve already lost sales.

Here are just a few examples of where things can go wrong and why testing WooCommerce from the start to the end is so important:

1. WooCommerce updates

When you google “woocommerce update broke my site,” 818,000 results are returned.

WooCommerce broke site
Unfortunately, WooCommerce updates do tend to break a lot of sites.

The catch-22 is that keeping your version of WooCommerce up-to-date is essential. New releases typically include bug fixes, new features, performance improvements and – most importantly – security fixes that keep out nasty bots and hackers.

It’s important that you set aside time for updates rather than do them “when you get around to it.” Schedule time in your calendar at regular intervals when you can back up your site, test WooCommerce updates on a staging site, and then apply them to your live site.

Having a routine process in place for handling updates will help lessen the anxiety associated with updating your site and also help you get into the habit of doing it regularly.

2. Adding or updating plugins and themes

No plugin or theme is perfect. New bugs are discovered all the time and with each update and improvement applied to extensions that power your store, the chances of a conflict or newly discovered issue increases.

For example, one plugin developer might have called a function the same thing as another developer in a different plugin. If you’re running these plugins with conflicting it’s a perfect storm leading to broken functionality.

Like WooCommerce updates, it’s important to keep plugin and themes updated for improvement and security reasons. While the possibility of an unpatched security issue being exploited on your site is pretty low, especially if you have taken precautions, there are malicious individuals out there who look for stores that are missing crucial updates and attempt to break into them.

With access to your store, hackers could try to steal your private data or break parts of your site. And this doesn’t just impact you, but your customers too.

So add plugin and theme testing to your calendar, too, and routinely test extensions before updating them on your live site.

3. Updating WordPress

WordPress is the underlying software that powers your site. Updating to the latest version can also break your existing store if it conflicts with your existing site setup.

Like WooCommerce, plugins and themes, it’s important to keep WordPress up-to-date for all the same same reasons. So ensure you test and update WordPress along with WooCommerce, plugins and your theme as part of your regular testing routine.

4. Making code or styling changes

Any customizations you make to your site that involve code or CSS changes, such as styling your shopping cart or checking, can potential break your store, especially if you make these updates to your live site without testing them first.

It’s also possible that new versions of WooCommerce or WordPress may conflict with your site’s custom template, breaking your layout – which is exactly what happened to many sites that were updated to WooCommerce 3.3 recently.

5. Adding/updating payment gateways

Whether it’s payment gateways not displaying properly or issues with PayPal or Stripe, there are lots of things, big and small, that can go wrong with payment methods at checkout.

Sometimes payment gateways can break after updating WooCommerce or a plugin, or it could be something as simple as running out of memory or your SSL certificate expiring – a fairly common occurrence as they have a limited lifespan.

6. Making changes to shopping cart

Caching, plugin conflicts and even changing permalinks can break your shopping cart. This means customers won’t be able to add items to their cart or successfully complete checkout.

7. Making changes to checkout

It’s not uncommon for checkouts to stop working suddenly, causing store owners to panic when they discover sales are down. There are many reasons why checkouts break – a PHP setting gone wrong, hosting configuration issues, problems with payment gateways, faulty database or plugin or code conflicts.

Whatever the reason, testing your checkout is crucial. Since it’s one of the last steps when a customer make a purchase, it’s not always immediately obvious when it’s broken. End-to-end testing can help ensure your checkout is working properly from start to finish.

What to Test? End-to-End Testing Your WooCommerce Store

It’s important to test WooCommerce as a customer would use your store. This means running through all the different scenarios, i.e. using guest checking, adding and removing items from the shopping cart, changing payment types.

The WooCommerce core development team has put together a core testing checklist that comprises 30 items. It’s a manual process that allows store owners, but mostly developers, to test WooCommerce before updating to the newest version of the software.

But going back to the functional end-to-end test I mentioned above, here’s a simple checklist to get you started so you can manually test WooCommerce:

  1. Homepage – does it fully load?
  2. Product pages – do they fully load so that shoppers can interact with them?
  3. Add product to cart – are customers able to add a product/s to the cart?
  4. Cart – does the shopping cart fully load?
  5. Checkout – does the checkout fully load?
  6. Guest checkout – are customers able to checkout as a guest?
  7. Customer login page – can customers register and login to checkout?
  8. Existing customer login – can existing customers login to checkout?
  9. Existing customer purchase – can existing customers make a purchase?
  10. Checkout payment process – can customers successfully make a payment at checkout?
  11. Checkout process – can customers successfully complete the checkout process?

In short, test any process that is involved in making a successful purchase on your site.

Automatic End-to-End Testing With Robot Ninja

But let’s face it, testing is boring and time consuming. Plus, it’s easy to miss steps when you’re busy. For many store owners, putting aside time to test WooCommerce is at the bottom of the to-do list because you’ve already got a lot on your plate.

That’s where automated testing can make all the difference. With Robot Ninja, you can schedule end-to-end tests to run in the background and get emails if any issues are found with your store. All you need to do it connect your store to Robot Ninja and it will run through a comprehensive suite of tests using real products and payments.

Robot Ninja is the only automated testing tool for WooCommerce. It lets you test WooCommerce in a fraction of the time it takes to do it manually. You can queue up a test and watch it as it happens in real-time (it only takes a few minutes) or go away and make a coffee and check in later.

How long it takes you to test your store manually depends on how fast and ready you are, i.e. know what products you want to test, have your payment details on hand, and have shipping information ready. But the beauty of Robot Ninja is that it can happen in the background while you’re doing other tasks. And if you have multiple stores, you can test them all at once, further speeding up the process.

Connecting one store to Robot Ninja is free. It’s a great option if you want peace of mind that your WooCommerce store is working smoothly, saving you time manually testing your site yourself.

It’s Important to Continually Test WooCommerce

WooCommerce stores break. It’s just a fact of life when you run a store and something you must be prepared for when working with WooCommerce.

Fortunately, regularly testing your site end-to-end can give you peace of mind that your store is working properly, and enable you to quickly fix any problems that you discover before they hit your bottomline.

Anything that touches your product pages, shopping cart or checkout should be tested from the start of a purchase to the finish. So whether you choose to manually run through tests on your site or set up automated testing, it’s important to do it regularly and make it a habit. Not only will it ensure your site store is running smoothly, but it’ll ease some of the stress associated with running a store and you’ll have happier customers, too.