How Do You Know Your WooCommerce Store Is Working?
The merchant who sent me a text was confused and struggling. His store was still live (active) and wasn't offline. But orders weren't going thru. He was trying to figure out what was going on. And worse, it seemed like maybe it had been going on for a while. This raises the question – how do you know that your WooCommerce store is working? And the answer is automated acceptance testing for WooCommerce.
Automated Acceptance Testing for WooCommerce
Acceptance testing is a bit different than the testing you think about when you think about software testing. This isn't the kind of testing where programmers write code to test code. This is customer-facing testing. It's the kind of thing that says, “when you do this action, this is what I should experience and what I should see.”
Acceptance testing isn't hard to imagine. But it does take effort to create. And often, if timelines are tight, it's not something a development agency or freelancer is going to complete before your store goes live.
Beyond the tight timelines and costs, there's another question… what should you test on your WooCommerce store?
What Should You Test on your WooCommerce Store?
Different stores can each be configured differently, even when using the same core software. So acceptance testing for WooCommerce can get tricky. It means you have to define the key pages on a WooCommerce store specifically. Otherwise, your tests will fail simply because the configuration of the tests don't match the details of your store.
That said, there are several pages and actions that should be tested on a regular basis. Here are the nine tests I suggest.
- The Main Shop Page Loads – Does the main catalog / shop page load up when you hit the url? It should. Every time. This is like knowing that your website is live. But specifically, you should test that your store is active, your shop page loads, and it is displaying products.
- A Single Product Page Loads – Now, if the shop page is loading, it should be pretty straightforward to click on a product and head to the product page for that product, right? If it does, great. If it doesn't, you have a problem.
- The Product Can Be Added to the Cart – You can see the simple flow we're following, right? If a product page appears, then I should be able to load that product into the cart. The “buy now” or “add to cart” button should appear and should be active so that a user can click it.
- The Cart Page Loads – Some stores don't take the customer directly to the cart when they've put something in it. That means you have to see the notification on the page that says the product has been added to the cart. You also should be able to click on the option to head to the cart, and that cart page should load. Most importantly, the product should be found in the cart.
- The Customer Can Move to the Checkout Page – If the cart loads, showing you the product, then we know what's next. Can a customer move to the checkout page to actually close the deal? They should be able to, which requires that the button to checkout is active and available.
- A Customer Can Check Out as a Guest – Two different kinds of people can normally check out from a store. The first is a guest. They don't have an account and shouldn't need one to put in their info and card details and finalize their purchase. That's what you should be testing here.
- The My Account Login Page Loads – But what if a customer wants to log in and make their checkout faster? The first step is allowing them to login. And that means you need to have the login page load. So make sure there's no conflict that is breaking that option for customers.
- A Customer Can Log In – We're in the final stretch as we've gotten to the My Account login page and it has loaded. So now we need to test that a customer can actually log in and continue with the checkout. That's this test.
- A Customer Can Checkout – Lastly, can the logged in customer quickly checkout with their existing customer, address, and billing information? That's our final test.
If that merchant had these 9 tests running, they would have known right away that they were having a payment gateway issue that was slowing checkout so much that customers were simply leaving and abandoning their carts.
How Often Should You Test Your Store?
Acceptance tests for WooCommerce are great. But if you have to manually run them, you will rarely get to it. That's why you want automated acceptance tests for WooCommerce. The “automated” is the key word. You want it running automatically without user intervention.
At least that's how I think about all acceptance tests. I just want them running nightly in the background. That way I can look and see how things are going. If I see green for days, I'm a happy camper.
Here's Some Good News
I was painting a picture for him of what I wanted. And we decided to give it a try. It would look something like this.
See those yellow circles above? They were the perfect reminder that I hadn't installed any payment gateway, which meant some tests failed right away.
And if I had been smart enough to run this for days before writing this post, you would see multiple columns instead of simply one day.
From their prototype, our internal team bolstered it up a bit and now it's becoming available for stores at Nexcess running on our WooCommerce Hosting plans.
That's seriously good news, right?