Test Cases for ECommerce Website
By Neha Bharati, Community Contributor - April 15, 2023
E-commerce websites are the most complex and intricate websites out there. This is due to their navigation, product categorization, preview functionalities, and key features like payment gateway integrations.
So it is non-negotiable while developing eCommerce websites to undergo rigorous testing, ensuring all the functionalities work together in harmony without affecting the user experience.
Why test E-commerce Websites?
- Fierce competition in the e-commerce industry.
- By 2040, 95% of all purchases will be through eCommerce websites.
- Online shoppers with a negative experience are 62% less likely to purchase from you.
Whatever the platform, web or mobile, overcoming eCommerce website challenges such as cart abandonment, responsiveness, bad UX, and unstable checkout procedures is paramount.
Let’s look at the different types of eCommerce testing and how they ensure their websites fare well with consumers.
Types of Ecommerce Testing
Ecommerce websites function like any other web/mobile website. Hence it undergoes various types of testing, such as:
- Functional Testing: If the tester wants to check if the checkout feature is working on the website and scoped only to that feature, it is called functional testing.
- Usability Testing: When a customer wants to buy an item, searching, adding to the cart, and making payment should be simple and easy. This is where usability testing kicks in.
- Security Testing: This ensures the safety of customers’ data by checking DENIAL OF SERVICE ATTACK, User Account security, Data confidentiality, content security, credit card security, disable non-essential services.SSL Certificate Validation When an eCommerce site stores customers’ sensitive information like their credit cards info, it should be rigorously tested so that the sensitive information does not leak out
- Performance Testing: When a single user is trying to access an ecommerce website, then it should be extremely responsive. Performance testing ensures that even when the app scales, with millions of users trying to access the site simultaneously, the site should be functional and not crash.
- Mobile Application Testing: As there is a lot of penetration into the mobile space, many users access the e-commerce websites on mobiles, So the website must have a good user experience across different mobile. This kind of testing is called mobile application testing.
Must Read: Tips to Optimze Shopify Website Speed
Test Cases for eCommerce websites
Now that we have the different types of testing applicable, it’s time to delve into the sample test cases for ecommerce website. To create practical test cases for ecommerce website, one must understand the structure of a typical site.
There are many features in an eCommerce website – hero carousel/slider, search, filter, product details, payments, checkout, etc. each having a pre-defined functionality.
For example, Every search bar should show relevant results, i.e., searching for electronics should show all categories like mobiles, TVs, cameras, etc.
Going ahead, we’ll pick a few significant features and list the test cases for eCommerce website:
General Ecommerce Test Cases
- The user should be able to navigate to all the pages in the website
- There should be a fallback page for any page load errors
- Verify that all the links and banners work properly
- Search results should be displayed with the most relevant item being shown first
- All data related to the product – title, price, images, and description are all visible clearly
- Maintain a session for each user and test verify the session times out after a while
Login/Registration test cases for Online Shopping Website
- Test for valid username and password
- Test “Forgot Password” and Reset Password functionality
- Validate If user is registered or not, and if not, provide an option to create an account
- Show Login screen by default for registered user
- Test that all fields are mandatory
Seller Product Creation Test Cases
For sellers who want to create their catalog, they should be able to add their products, and this flow should be tested.
- Test that authenticated sellers can access authorized product creation panels under authorized categories.
- Test the maximum product creation limit to avoid adding more products to the catalog.
- Test that seller’s products are visible after some time
- Test the product creation process is working fine for the seller
- Test that there are no duplicate products
Search Bar Test Cases for Online Shopping Website
- Test what parameters the search is based on – for example, product name, brand name, category, etc.
- Test if the search results are relevant
- Number of results to be displayed per page
- Test whether the search API is being called at every keystroke. (This isn’t recommended, as it would unnecessarily cause multiple API calls to the database)
Example of a filter
- Test if the user can filter based on all the parameters on the page
- The user should be able to see results with default search criteria when at least one of the filter parameters isn’t mandatory
- Validation messages for invalid filter criteria
- When at least one filter criteria are required, and the user selects none, proper error messages are shown
Product Detail Test Cases
- Test that all the product details are displayed correctly and that no empty/invalid details are displayed.
- Product Images should be optimized for size and dimensions, which further helps in performance testing.
- If there’s breadcrumb navigation, each link in the breadcrumb should be functional. Below is an example of breadcrumb navigation.
- All the links(size, Pincode check, etc) about the product should be functional.
- Test that all items are added into the cart
- Test that all added items have at least a quantity, price, and delete option associated with it
- Test that the user can increase/decrease the quantity from the cart
- If a user adds the same item to the cart the amount of that item should increase in the cart
- On closing the tab/leaving the site, the items should still be in the cart upon returning to the website.
- User should be able to add coupons
- User should be shown the total amount with the necessary breakup as applicable.
- User should be able to select the desired payment method
- On adding more items or increasing/decreasing quantity, the total should change accordingly
- Calculate shipping costs based on shipping methods
- Right address should be selected and the user should be able to edit/add the address
- Perform security testing if in case the user’s credit card details need to be saved
- For returning customers, they should be redirected to log in for checkout
- User should be logged out after the session times out
- Emails/test confirmation when the order is confirmed
As you can see, an eCommerce website has many more tests or features, and testing each is very time-consuming and requires effort. Thankfully, a few tools and techniques are available to ease the website testing process.
- One can go for automation test cases for ecommerce website across browsers, devices, and operating systems.
- Test for responsiveness with mobile devices and also perform performance testing with Speedlab.
Testing Ecommerce Websites using Browserstack
Let’s have a look at amazon.com with BrowserStack Live.
(Loading live testing session on Google Chrome 112 running on macOS Ventura)
Amazon.com loaded on BrowserStack Live
This is the Amazon homepage loaded on a macOS Monterey on Chrome browser. Users can navigate through the website and test key features and website flow.
Let’s load the eBay website on Speedlab and look at its performance report.
Here is what the dashboard looks like provides a list of devices and browsers, and operating systems. Based on your preference, you can choose the right device-OS-browser combination.
On clicking Get Report, you see the following page. Once it is done loading, the report is generated.
Some sample reports are already available if one wants to look at them.
Here is the website’s final report; scrolling down, you get the details of each parameter used to calculate the score. Some recommendations can be implemented to improve the score.
When building test scenarios for eCommerce businesses online, take the above sample test cases for ecommerce website into account. The essential part of eCommerce testing is whether the website successfully converts visitors to paying customers. One can make a detailed test plan, formulate test cases, and leverage such tools to perform tests.
- It should also test well for accessibility both on mobile and the web to ensure an inclusive user experience for people with disabilities.
- Ecommerce websites are very dynamic, with new features continuously being added, so test plans must be constantly updated to cater to such changes.
- Making the website responsive is also essential to improve conversion rates.
Of course, depending on the suite’s nature, more tests may be required. However, the tests described above must necessarily form a part of any QA blueprint of an eCommerce site. No matter which test case you consider, always remember to test them using a real device cloud like BrowserStack for accurate results.