In a competitive online market, the quality of a store’s website can be the differentiator that brings success. As development moves a high pace in most online stores, I would like to show how QA testers can help themselves by using automatic tests and raise the quality of the tests performed to an even higher level. 

Why is it essential to perform automatic tests on eCommerce sites?

eCommerce systems are very complex. The end-user only sees the basket, catalog, and checkout, but there is much more going on under the surface. All eCommerce sites will also include an administration panel and integrations with external services such as Akeneo, Pimcore, and Microsoft Dynamics AX, as well as further services like payment gateways and price comparison tools. 

The entire website requires a thorough approach and a testing strategy that protects against any unexpected actions that may result in the inability to make sales and a loss of customers. eCommerce websites tend to develop dynamically, which further complicates the monitoring of delivered quality and the delivery of new solutions.

In this case, automatic tests come to the rescue. They are a necessary element for maintaining a high-quality website that moves at a fast pace.

Test scenarios for eCommerce

eCommerce systems are developed to a different extent; however, we can create an eCommerce website testing checklist that contains the most popular test scenarios. A good test plan will ensure that the quality of the service provided is at the highest level.

This is possible due to the fact that, despite the different sizes of online stores, each contains basic elements and functionalities that are repeated in every website

An eCommerce website testing checklist

  1. Homepage: The main page of a website is its showcase. Its content can range from ordinary banners and basic information about the store to extensive product sliders. The first impression it makes on the customer can have a key impact on whether or not they explore further.
  1. Login and registration: These are key functionalities, the failure of which may block the use of the website and automatically result in the loss of the customer
  1. Checkout: The shopping path is the most extensive and most important issue in the store. It covers the entire stage of building the order—from editing the products added to the basket—through to choosing the delivery and payment methods and placing the order. If this functionality is not tested and there are bugs in it, it will certainly result in loss of the client, most likely irreversibly
  1. Payments: The payment options on a large site are usually very extensive. Along with the payment methods, they create many options for customers to choose from. Each combination is a different operation of the website when creating an order and each may cause problems and the inability to place an order. You need to check all combinations to make sure all payment options are tested.
  1. Search: An search engine should conveniently provide a lot of information to a customer who is looking for specific products. If the search engine fails, the user will have the impression that the products they are looking for are not in the store, which usually results in them leaving the website.
  1. Friendly user interface (UI): When testing a store, you need to put yourself in the customer’s shoes to see which elements of the website that make it difficult to use all the functionalities of the store and lead higher bounce rates. The QA often checks exact functionalities without looking at the entire site as a whole, which is how the user sees the store.
  1. Shopping cart: The product sheet contains a lot of important information for the customer who is interested in the product. You should check and make sure that all information is legible and any functionalities work properly. The product sheet is also crucial when adding products to the cart; if it ends with an error, it usually causes the customer to abandon their shopping.
  1. Promotions code: Promotions are very important for users who are attracted to the store by special offers. These functionalities are often forgotten during the basic use of the website and can play a key role in the user deciding to place an order or take advantage of the competition’s offer with a discount code.

What are the most popular test types?

As eCommerce applications/sites are web applications or mobile applications of varying complexity, they must pass all common types of testing. To have any certainty of the quality of the solutions provided, you need to take a multi-faceted approach to testing. Tests are not only “clicking” the page; you have to check the entire eCommerce in a number of ways to cover most of the code responsible for functionalities.

The most popular test types

  • Functionality tests (black-box testing)
  • Usability test
  • Security testing
  • Performance test
  • Database testing
  • Mobile application testing
  • A / B tests

Why choose automated tests for eCommerce sites?

Automatic tests do not completely replace manual tests; they form a whole that ensures the highest quality when developing an eCommerce website. 

In automated tests, test cases are executed using software and scripts. The aim of this method is to perform tests in a short time, using repetitive tasks and regression tests after each shift, which doesn’t waste time in QA. Sometimes, even in this case, certain parts of the process require intervention from a manual tester to maintain and develop automated test scripts as the system evolves.

It is impossible to say which method is better. Manual and automated testing are both used in a variety of cases, depending on many factors, such as budget, project requirements, resources, time, relevance, experience, and project structure. However, some types of testing are better handled manually while others lend themselves to automation.

A comparison of Manual Tests and Automatic Tests

In the table below, I have compiled the most important considerations for each type of test in terms of time, quality, reporting, repeatability, and when to apply each type. You can see the differences and draw conclusions that will help you decide which type of tests will be better for your application.

A comparison of manual and automatic tests
A comparison of manual and automatic tests

Automation doesn’t exclude manual tests; it rather completes the entire testing process, creating a whole. As in the case of manual tests, automated tests require a strategy preceded by an appropriate planning, monitoring, and control process, as well as continuous maintenance and development so that automatic tests develop along with the store.

Advantages of automatic eCommerce tests

A big advantage of automatic tests is the possibility of using the Allure library to create a test report.

The report is created in the form of an interactive HTML report. The advantage of the Allure library is the possibility of integration with any technology, e.g. with Java, Python, JavaScript, PHP, .Net, etc.

The advantages of the report:

  • Clear test status at any time
  • List of steps that have been performed
  • Execution time for each scenario
  • Screenshots of the test steps performed

Dashboard:

The Allure automatic test tool dashboard

Details of the steps taken:

A view of the steps taken in an automatic testing process using Allure

Recommended technologies for automatic tests

Test automation cannot be accomplished without good tools because they determine how the automation is done and how many options we have when creating an automation framework. Test automation tools are a key element. The wrong choice of tools may not only interfere with the creation of tests, but it can also cause higher costs and be much more time-consuming. This will, ultimately, result in low profitability of creating the entire framework.

Selenium tool for testing websites 

Selenium is a popular tool for automating operations performed by the browser. It is most often used to test web applications, especially on the frontend. Thanks to this tool, we can automate most of the activities performed by the user and, thus, automate the process of testing changes in the developing eCommerce system.

Advantages of Selenium:

  • Support for multiple web browsers: Firefox, IE, Safari, Opera, and Google Chrome.
  • Works on many operating systems: Windows, OS X, Linux, and Solaris
  • The ability to write in many programming languages: C #, Java, Perl, PHP, Python, and Ruby
  • The ability to use Selenium Grid—conducting tests simultaneously on many servers—with different configurations, browsers, etc.

Cypress testing framework

Cypress automation tool is a JavaScript framework primarily for end-to-end testing, i.e. restoring the full operation of the system from the user’s perspective.

Configuration, creation, launching, and debugging of tests don’t require complicated actions and allows for faster creation of the entire test framework. 

Tests are performed directly in the browser, which ensures greater speed and control while creating tests.

Advantages of the Cypress tool:

  • Cypress doesn’t use Selenium, it is based on a new architecture
  • It works on any website and is built to be particularly good at supporting modern JavaScript frameworks like React, Angular, Vue, and Elm 
  • Cypress works equally well on legacy pages rendered on the server or in applications
  • The test code is executed in the browser itself
  • Fast execution of tests in the Cypress browser
  • Cypress supports the following browsers: Canary, Chrome, Edge, and Firefox

Dashboard:

A view of the basic Cypress dashboard

View of the tests performed:

Views of test results produced by Cypress

As you can see, we have the ability to check each step of the test performed and there is the big advantage of seeing the actions performed in the browser when the test is performed.

Is it worth performing automated tests for eCommerce sites?

Writing automated tests gives us control and confidence that our project works properly—even when site development is moving at a rapid pace and changes are being made by people who are perhaps less familiar with the entire system. Automatic tests don’t replace manual testers. In fact, they allow testers to spend more time focusing on the parts of the system that cannot be covered by automatic tests. The unified process guarantees the maintenance and delivery of a high-quality developing system.

Grzegorz Księżarczyk

Grzegorz Księżarczyk is a software tester with over three years of experience and a name that is a nightmare for foreigners. He's interested in automation tools and the future of testing. Passionate about basketball and hip hop music.

Share your comment