A guide to test e-commerce websites and not die trying

Most e-commerce websites share a similar theme and general structure:

ecommerce ok

   Typical structure of e-commerce

·                     Home page

·                     Search results page

·                     Product details page

·                     Request form page

·                     Order confirmation page

·                     Log-in form page and account pages

Needless to say, there are many other pages on an e-commerce website, but the main user journey usually touches on the ones mentioned above. This is where testing in e-commerce should take place: in the payment flow. 

These front-end pages will probably communicate with the back-end services, and it is therefore important when testing e-commerce websites to also test individual services both separately and integrated into a full system.

A typical flow would begin at the home page, looking for one or more products, reviewing them, adding products to the shopping cart, filling in the details of the order and payment information, and finally, placing the order.

1. Case Description and examples of testing of certain elements

Below, we will examine some common test cases, specifically conceived to test e-commerce websites. The ideas presented are only generic and apply to most e-commerce websites.

1.1 Shopping cart test

Shopping carts are one of the main features of an e-commerce website, and are therefore the key piece of test websites. They allow users to select and store several items, and then purchase them together.

Nowadays, shopping carts have become ‘’smart carts’’; they remember stored items so that they can be recovered at a later date and even from another device.

In most cases, cookies are used to store data in the cart, or if the user has an active account and is connected, the log-in details can be stored matching it with the user on the database.

What follows is a description of some key test cases for a shopping cart:

·                     Add an item to the cart: the cart has to update with the item, name, image and correct price.

·                     Increase the number of items in the cart: the price must be updated to reflect the correct sum.

·                     Add the same item several times: there must be an item in the cart, but the amount should reflect the number of added items and the total price should reflect the sum of the price of each article.

·                     Add several elements of different types: for each element added, we should be able to see name, image, corresponding price and total price for all the items.

·                     Eliminate elements from the cart: the cart should update to show the existing items in the cart, and the total price should reflect the new sum.

·                     Eliminate all items from the cart: the balance on the cart should be zero and no items should appear in the cart.

·                     Click on an element in the cart: we should be able to see the product information like a pop-up window or we should be redirected to the product page.

·                     Add articles to the cart, close browser and open the same site again: ideally, the cart should still contain the items. This may vary, depending on the behavior requirements for the cart.

1.2 Forms used for search, classification, filtering and paging

The search form usually appears in several pages to allow users to search for products wherever they may be on the site. Therefore, it is important to test the search function in all corresponding pages.

Most likely, the code for the search module is reused in several pages or templates, or could be part of the header shown in the entire site. If this is the case, the behavior of the search function must be the same wherever it happens, and therefore executing test cases on all pages will be a waste of time.

When we look for a product, we are redirected to the search results page with all the relevant associated elements. There is much to verify here and many functions to test, but the three most important and relevant features are: classification, filtering and paging. 

Here are some tips for testing:

·                     Paging: check that all the elements in the next page are different from the ones in the previous page, that is, avoid any duplicates.

·                     Classification: usually there is a single selection, that is, you can sort only based on one parameter.

·                     Classification and paging: when there are products in several pages, it orders them based on a parameter. The classification order must remain as paging, or with more loaded products.

·                     Filtering: the filter options are multi-selection, that is, filter based on multiple parameters. It is advisable to explore individual filters and multiple filter options.

·                     Filtering and paging: once again, when we filter a page, ideally as we page we want the filter to be applied at all times.

·                     Classification and filtering: a test case is to mix the options of classification and filtering. Although the individual features could themselves work individually, when combined, the functionality of one or both features could break down, and it is therefore essential to verify results when combining them.

·                     Classification, filtering and paging: verify that, when both the ordering and the filter have been applied, they maintain their paging or load more products

1.3  Create account and log-in

Some e-commerce websites allow users to purchase a product as guests, that is, with no need to create an account. Then, as an optional step, they offer the possibility of creating an account after the order is placed.

When an account is created, users may log-in at any stage of the purchase flow, and therefore, it is important to test all the variations throughout the user’s itinerary.

Below are a few suggested main tests that can be performed on these functionalities:

·                     Purchasing an item as a guest: if the site allows it, check whether an article can be purchased without creating an account.

·                     New and existing accounts: purchase an article with an existing account and with a newly created account.

·                     Create an account and log in before you buy: do this to make sure the article purchased is added and connected to the correct account. Also, users should not have to log-in again once they are already logged in.

·                     Redirect: check the behavior of the log-in function in different pages.

·                     Account log-in: when logging in, check that it remains connected while browsing the products. Also, you should test the behavior when users are not interacting with the site for some time and see if the session expires.

·                     Log-in and log-out: when you log in, log out and make sure that none of the pages of the account can be accessed.

 1.4 Payments

Payments are an essential part of testing e-commerce websites. After all, this is what allows users to purchase items with no need to call a number to place their order. To test this functionality, we must bear in mind the following:

1.             Payment methods: Different payment methods should be tested, such as credit cards, PayPal, wire transfers, installments, etc.

2.            Client’s card information: Check that they are stored. If so, verify this is done in a secure manner.

 1.5 Tests after the purchase

When we place an order, users can do many things with the purchase, that is why it is important to test what happens after the transaction. In this sense, the following actions must be considered:

·                     Change in the amount or cancellation of order.

·                     Review recent order and the history of purchased items.

·                     Changes in the account, such as billing address, shipping address, password change, profile information change such as name, e-mail address and even elimination of account.

There are undoubtedly many more functionalities to test, but this article is only an introduction to all relevant test cases that can be executed when testing an e-commerce website, and can be used as a starting point.

Sources:

https://www.testingexcellence.com/testing-e-commerce-websites/

https://www.solostream.com/general-requirements-for-e-commerce/

https://www.tecnopymes.com.ar/2018/01/17/el-boom-del-e-commerce-favorece-a-las-pymes/

Author:

Ricardo Manuel Jigena.

Technical tester.

 

Baufest en Instagram

Contact Us

info@baufest.com