How to Efficiently Test Orders on Shopify
Testing your Shopify store is important to avoid a buggy or broken site, and to ensure good user experiences that will keep your customers coming back time and time again. Learn how to test the most important process - order placement - in this blog post.
When you build a webshop using Shopify’s platform, you need to test the order process to ensure that functions like checkout and payment work.
Overall, there are two approaches to this - manual and automated.
In this blog post, you will learn:
-
- How to manually test your Shopify orders
- How to speed up your order testing with easy-to-use automation
If you’re testing an order for the first time, start with a manual test. We’ll guide you through this process, step by step.
As soon as you know how to test your order placement manually, you should start considering automation. We’ll explain why further on.
First, let’s have a look at manual Shopify order testing.
How to test Shopify orders manually
1. Enter test mode
The first thing to do when testing is to make sure that you have a test environment. You cannot test payments in production (your live environment) because you then have to make a real payment. If you’re testing multiple payments at once, it’s very inefficient to have to cancel those payments or to make refunds afterwards.
Shopify have an option for this for premium customers called Test Mode in Shopify Payments. For non-premium customers, Shopify have created a workaround called Bogus Gateway.
To use the Bogus Gateway, navigate to Settings > Payment Providers and click Add a Provider. Click Third Party Credit Card Provider and select (for testing) Bogus Gateway from the drop down menu. From here, Shopify provide you with the instructions on how to use this method.
2. Add items to basket and check out
Next, to start your test, navigate to your previewed site, and add at least one item to your basket.
Then, click check out, and fill in the required fields with customer data. If you’re using an application that pre-fills fields, make sure to turn this off first.
Before you proceed to payment, select any shipping method.
3. Payment
At this stage, you need to enter credit card details.
If you’re using the Bogus Gateway method, all you need to do is select the yellow B option as payment method and enter 1, 2, or 3 as your credit card details, depending on what you want to test (again, this is explained when you activate the Bogus Gateway).
If you’re using test mode, you’ll need test credit card data. You should test both successful and failed transactions to check that the message customers receive after payment is accurate.
You can use the simulation data provided by Shopify to do this:
For successful transactions:
- Name on card: Enter at least two words.
- Expiry date: Enter any date in the future.
- Security code: Enter any three digits.
- Card number: Use any of the following numbers:
Card type |
Test credit number |
Visa |
4242424242424242 |
Mastercard |
5555555555554444 |
American Express |
378282246310005 |
Discover |
6011111111111117 |
Diners Club |
30569309025904 |
JCB |
3530111333300000 |
For failed transactions:
Error message |
Test credit number |
Card declined |
4000000000000002 |
Incorrect number |
4242424242424241 |
Disputed transaction |
4000000000000259 |
Invalid expiry month |
Expiry month: 13 (any invalid month) |
Invalid expiry year |
Expiry year: 2020 (any past year) |
Invalid security code |
Security code: 99 (any two digits) |
Source: Shopify
4. Exit test mode
Once you’ve completed your tests, make sure to exit test mode or switch off the Bogus Gateway method, to ensure that payments can be processed as normal again.
Why automate your Shopify order tests?
Order placement is the most important process in your webshop. This process, which typically involves adding items to a cart, check-out, and payment, is essential for bringing in business revenue.
For this reason, you need to make sure that customers can, at all times, move smoothly through the process. Testing an order placement before going live, or every once in a while, isn’t enough.
Testing an order placement every once in a while isn’t enough.
Why? Because there are several things that can negatively impact your site and its core functionality: Shopify push out updates on the regular, and you will also need to release new features and functionality sometimes, which can influence your site in unexpected ways.
In other words, internal and external factors can impact your webshop, and neglecting testing can have incremental costs for your business.
In addition, reaching the desired test coverage manually requires hours of manual testing each time an update occurs. For most businesses, it’s impossible to test the desired amount in time for every release. This puts the business at risk.
In addition to business-critical processes, you should also make it a priority to test:
-
- Plugins/integrations
- Cross-browsers (Chrome, IE, Safari)
- Cross-device (mobile, tablet, and desktop)
- Cross-platform (Windows, Android, MacOS, iOS, and Linux)
- User influx (load testing)
- Page load time (performance testing)
Over time, manually testing all of this isn’t feasible, which is why you need to start thinking about which tests you can automate to make quality assurance more efficient.
Learn more about what to test in Shopify and why it’s critical in this blog post.
How to automate your order tests quickly and easily
To automate your Shopify orders you will need a web automation tool.
Selenium test automation is a popular choice, since it’s free and open-source. However, it requires significant coding skills to use, and therefore isn’t necessarily your best option.
Instead, you can use Leapwork, which uses Selenium under the hood, but has an intuitive user interface and doesn’t require any coding. Get a free trial here.
Leapwork has a record-and-play functionality, which means that, to automate, all you need to do is click through your website and enter your details with test data, just as you would if you were testing manually.
One of the key differences between Selenium and Leapwork is the amount of time saved on automating. See the video below, where two testers automate filling in a form on a website:
Want to learn more about automating with Leapwork?
Learn about Leapwork’s automation solution for Shopify or learn how to build great online experiences with automated web testing in our whitepaper: Automated testing for Ecommerce.