Introduction to the Native Mobile Grid

The Applitools Native Mobile Grid is a new service that can significantly reduce the execution time of your visual test by offloading checkpoint image generation to the cloud where it can be processed concurrently on multiple servers. The Native Mobile Grid also provides an out-of-the-box solution for cross-browser tests, so you do not have to setup and maintain an in-house QA lab with multiple machines and devices.

This article is an overview of what the Native Mobile Grid can do and how it does it. In the Writing visual tests that use the Native Mobile Grid page, there is a detailed example and description of code that uses the Native Mobile Grid.

The Native Mobile Grid supports a variety of mobile devices, including iPhone and iPad devices, Samsung Galaxy devices, Google Pixel and more. See Native Mobile Grid - Supported Devices for a complete list of supported mobile devices.

Native Mobile Grid functionality

When a visual test is run without the Native Mobile Grid, the Eyes SDK interacts with a mobile device to capture one or more screen images that cover the entire screen, stitches the images together and sends this to the Eyes server.

When you set up the SDK to use the Native Mobile Grid, the SDK still interacts with the desired device, but instead of constructing the full page image, it sends the resources required to generate the images in an efficient way, and it is the Native Mobile Grid that generates the image (a process referred to as rendering) and sends it to the Eyes Server to be matched against the baseline image.

With the Native Mobile Grid, you can now easily write, execute, and maintain your visual tests once, on a single device, and then render the results on various devices.

The Native Mobile Grid architecture results in a significant performance boost by transferring part of the functionality to cloud servers to take advantage of concurrency and cloud-based multi-processing.

Native Mobile Grid architecture

A number of factors contribute to the performance gain when using the Native Mobile Grid:

  • The resources sent by the test client are typically much smaller than the actual image sent for each device.
  • The Native Mobile Grid servers are optimized to generate full pages at speed.
  • The functional test is only executed once, but the data can be used to render and test multiple checkpoints on different devices. This not only provides a performance boost, but also simplifies your test and makes it more robust.
  • Multiple rendering, checkpoints and entire tests can all be processed concurrently in the cloud, allowing you to process a large number of tests and test targets in a short testing time.

The figure below illustrates the concurrent data flows and processing when using the Native Mobile Grid to render multiple tests, checkpoint and device configurations.

To summarize:

  • The functional test runs just once on the test machine, taking relevant data at each visual checkpoint.
  • The Native Mobile Grid renders each checkpoint multiple times, one for each variation of the requested target device.
  • In the Eyes Test Manager, you will see a batch of test results, one test per configuration.

Types of rendering targets

There are the following types of rendering targets:

  • Android device: The screen is rendered using either a local device, emulator or a real device running on the chosen environment.
  • iOS device: The screen is rendered using either a local device, simulator or a real device.

Click Native Mobile Grid - Supported Devices for a list of supported devices.

How to configure your test to use the Native Mobile Grid

The code snippet below illustrate the minimal changes needed to use the Native Mobile Grid in your code. The code snippet is not a complete example. Some of the code that typically appears in your test code is not shown.

The following example illustrates Support for a variety of Android devices (Samsung Galaxy S21, Galaxy Note 10, etc.).


                                

The following example illustrates Support for iOS devices (iPhone 13 Pro Max,iPhone 12 mini,iPad Air etc.).


                                

Summary

Using the Native Mobile Grid provides the following advantages:

  • Out-of-the-box cross-platform testing without the need to build, maintain, or pay for a device lab.
    • Just configure the platforms and devices you want to test.
    • More robust and stable than solutions running multiple remote functional tests.
  • Faster test execution and decreased testing time:
    • Offloading checkpoint image creation to powerful cloud servers.
    • Parallel processing of tests, steps, and multiple cross-platform renderings.
  • Minimal coding overhead:
    • Work with your existing Eyes test. Just add platform configurations and turn on “UFG mode” in the SDK.