Automated Testing for eCommerce
As part of EmpathyBroker’s QA team, our mission is to ensure that the user’s search and discovery experience in multiple eCommerce sites is of the highest quality.
Through automated testing, we’re able to complete our manual QA process and ensure greater coverage of our search and navigation experience.
As mentioned in our previous article “The Impact of Automated Testing in QA Environments”, it’s essential to understand which tests can be automated and which are the most appropriate for manual testing. Identifying the critical functionalities where a product is most likely to fail, and designing robust automated tests that identify and uncover any potential any errors.
In this article we’ll introduce the main areas in which automated testing plays a key role in EmpathyBroker’s QA process.
At a API level
Consumers value search as the third most important aspect on an eCommerce site. Therefore, its correct functioning is crucial. To ensure this, at EmpathyBroker we have a suite of automated tests that verify the main functionalities offered by the search service, such as suggestions, partial results, search by reference, links, or the most clicked products.
The communication with this service is achieved by use of an API Rest, which carries out the search queries. This makes this API one of the most important components, and on which a large part of the automated tests are performed.
Currently, most retail eCommerce sites are international, which means that they have multiple languages and markets that help them grow and easily reach customers from different parts of the world. In addition, in many cases the product catalogues offered can be extensive and vary frequently.
Checking each of the functionalities of several search sites in all the languages in which it’s available is a tedious and extremely lengthy task if we do it manually. This is the type of scenario where test automation is really necessary. It allows us, for example, to test that when making a specific query we are shown products with greater relevancy at the top of the page in every possible language or market configuration.
Through its use, we can detect errors in the service before it goes into the production environment, and then throughout its life cycle. In addition, by testing the API we manage to isolate the errors from the rest of the system, and verify that the search service is working correctly, regardless of the market or the language in which we access the search site.
Automating these types of checks has the main advantage of saving time, as well as enabling the reuse of the tests. Thus, each time a new version of the service is developed, the tests are executed to ensure that when an improvement is introduced, everything continues to work as it did previously.
The final user’s point of view
One of the parts that the user values most from a site search is its interface. It’s essential to ensure that it provides the best possible browsing experience, useful functionality and provides a pleasant search experience for the user.
Testing the functionalities that the user interface provides is essential. We must be clear about what the interface should allow us to do and make sure that it actually does it.
At EmpathyBroker we verify this by using automated user interface tests for each of the functionalities that we provide with the eCommerce graphical interface such as instant search, autocompletion, infinite scrolling, related queries, or user search history.
To do this, we design tests that simulate the behaviour of the end user on an eCommerce site. Each of the functionalities of the graphical interface is covered with one or more tests, which represent different use cases or a sequence of interactions that a user performs with that functionality. For example, searching for a product by its reference and then clicking on it. We verify it’s accuracy, not only on the fact that the action undertaken was successful, but also that the calls to the different services, such as the search service, were carried out correctly.
Automating this type of test allows us to verify the functionality of products from the perspective of the end user, in an efficient way and one that’s faster than if we were to perform them manually. In addition, we don’t have to worry about if the internal components are modified, the tests will remain valid as long as the functionality of the interface remains the same. This type of testing technique is known as black box testing, since the tester knows nothing about the internal functioning of the system, it only verifies the outputs against the expected result.
Today, more than half of eCommerce users access online retail sites through their mobile phones. Automating these user interface tests allows us to easily check the functionality simultaneously in different types of devices and browsers. To perform these checks manually would take a considerable amount of time.
We do however, leave other aspects, such as the intuitiveness and comprehensiveness of the interface, in the hands of manual testing, as these factors are easier to verify from a human point of view.
It’s important to verify that users can use a product correctly, and it’s equally important to make sure that the system responds appropriately when a query is performed or any other, perhaps slightly unexpected, actions take place.
By introducing automated testing within different layers of the system such as with the service and user interface, we’re able to facilitate this task, identify errors quickly during development, and guarantee a high level of quality in the final product.
In the next articles, we’ll look in more detail into how we approach automated testing in each of these different layers.