2024-04-23
Overview
Mobile QA teams are increasingly removing manual testing. The need for automated testing is growing. Most teams automate Unit, API, Integration, and Functional UI testing. An important aspect of mobile automation testing is Visual testing. Visual UI Testing is critical to catching unintended visual bugs while updating UI components. Visual bugs are difficult to find using functional tests that identify bugs in the workflow. If visual testing has not been tried before, readers may be surprised how many visual bugs can be found with an automated visual testing tool like Applitools. Manually finding visual bugs is painful because it requires comparing hundreds of images of a mobile app. Applitools provides AI-powered visual regression testing. This enables cross-platform testing to identify visual bugs. The focus is on the visual aspects of an app and on exposing visual differences between baseline snapshots and current or future snapshots. Applitools’ end-to-end visual testing and monitoring solution helps developers, test automation engineers, QA professionals, and DevOps teams run visual tests at scale across every app, browser, OS, and screen size. Applitools allows developers to verify that each UI element on a page appears in the right color, shape, position, and size and that it does not overlap or hide other UI elements.
What are visual bugs?
A visual bug is a difference between the expected appearance and the actual appearance of a UI element. Visual bugs affect how content looks rather than how it functions. The concept is similar to the spot-the-difference games you may have played in childhood.
Examples of visual bugs
- Text blocking buy button on Southwest Airlines website (Source: Applitools)
- Search box blocking shopping cart on ThredUp Website (Source: Applitools)
Fragmented Android Market
Android device fragmentation can cause visual behavior to vary across devices. Visual testing becomes more critical for Android apps when many devices with different screen sizes exist. Time-to-market pressure increases the need to run tests across a large set of devices in the easiest way possible. Testing mobile apps on physical devices or device farms is cumbersome, slow, and expensive.
Applitools and Genymotion SaaS
Applitools teamed up with Genymotion to make parallel visual testing far easier for QA engineers. Genymotion SaaS is a powerful Android emulator on the cloud to run Appium tests and reduce time-to-market. With flexible per-minute pricing, engineers can manage testing costs by scaling up or down the number of devices. With Genymotion SaaS, testers at any level can sign up and try the solution on-demand, without a contract.
Applitools and Genymotion SaaS
Our teams decided to work together with Applitools to solve this common problem: test the visual portions of an app on all Android devices at the same time. Engineers can parallelize their visual UI tests using Applitools and Appium across all Genymotion SaaS virtual devices at once. This enables faster bug detection and shorter test runs. QA engineers appreciate the ability to test mobile applications on a large number of Android devices and screen sizes, which is hard to scale with physical devices. Genymotion SaaS virtual devices accelerate parallel testing. The collaboration enables faster visual comparison on more configurations while also showing previous builds. This article presents steps to parallelize Appium tests for visual testing across Genymotion SaaS devices.
Running Appium visual tests using Applitools on Genymotion SaaS
1) Write Appium tests using the Applitools SDK for Appium to take screenshots for visual testing. In the tests, use the udid capability to define the Genymotion device on which the tests will run. The adb serial for Genymotion devices is localhost:XXXXX, where XXXXX is a port number defined in advance.
2) Launch Genymotion SaaS devices via the gmsaas command line.
3) Run visual tests across Genymotion SaaS devices using Appium.
For in-depth information on setting up Applitools and Genymotion SaaS devices and running those tests, refer to the step-by-step tutorial. Video tutorials on running Applitools visual tests with Genymotion devices are available. Readers are encouraged to try the solution and report results.
More about Genymotion and Applitools
Find out more about Genymotion, or sign up for a Genymotion SaaS account to get started. Find out more about Applitools. You can read their thoughts on using Genymotion, Appium & Applitools to test Android apps, and view their Appium tutorial.