Ensuring End-to-end Quality with Visual Testing

38% of people will stop engaging with a website if the content or layout are unattractive and 57% of internet users say they won’t recommend a business with a poorly designed website on mobile (acc. to sweor.com)

Maintaining a high level of quality for your apps and/or website is not limited only to testing their functionalities and features. Instead ensuring end-to-end quality involves testing what your customers and/or visitors are actually using, and seeing. Thus, functional testing of a web application is no longer enough, as the application may function without issues, but its UI may be a mess due to some last-minute CSS changes. This means employing not only functional testing, but also visual testing that would ensure the software user interface (UI) appears correctly to all users. 

Benefits

The benefits of implementing visual testing are countless for the users of the web or app, the development team, and the company in general. Following is a list of benefits that each of these groups would experience:

Development TeamCompany
Increased confidence while developingSatisfied users and improved user retention rate
Less code to maintain, i.e. code reductionIncreased productivity
Quick bug detectionSignificantly improved web and app UI
Increased code quality and UIIncreased overall revenue
Regression reductionReduced chances for an app or web failure
Reduced workload and time invested in executing test casesQuick and consistent delivery of visually perfect apps and web
Fast implementation
Open-source free tools can be used
Automation

Speaking from the users’ perspective, the greatest benefit of implementing visual testing is a seamless working of the apps and website.  

How it works

Visual testing is built based on screenshot comparison, so the test will pass/fail depending on the differences found in images. The modern tools for automated visual testing, currently found on the market, offer integration with existing UI tests, thus the need for learning new frameworks is omitted.

Of all the visual testing tools, we have chosen to use CodeceptJS for the purpose of visual testing. The reason for doing that is because the tests built-in CodeceptJS can be easily migrated from one backend helper to another.

Currently, there are two helpers available for Visual testing with CodeceptJS: Resemble helper and Applitools helper. Both can be easily integrated within existing UI tests, by simply installing the package and adding of couple code lines that do the magic. In the beginning, a base image is saved, and then on each test re-run, another screenshot is made and is compared to the initial base image.

While Resemble helper provides a free option, it has its own limitations compared to Applitools. With Resemble.js, we get a pixel-by-pixel comparison on images, which for larger projects and a wider range of screen resolutions and devices would take more effort to automate.

On the other side, Applitools offer a Visual AI engine for smart image comparison in order to avoid any false positives. Their Ultrafast Grid provides built-in functionality for visual testing on different browsers, viewports, and mobile simulators. All this can be pre-configured, so the results are received in a period of minutes.

Click on the buttons below to find out more about visual testing with each of the aforementioned helpers.