Introduction to the Ultrafast Grid

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

This article is an overview of what the Ultrafast Grid can do and how it does it. There are two additional articles that provide a detailed example and description of code that uses the Ultrafast Grid. The article Migrating code to use the Ultrafast Grid is a concise description, designed to get you up and running converting existing code to use the Ultrafast Grid as quickly as possible. The article Ultrafast Grid Configuration is more expansive, describing in detail the various options that are available.

The Ultrafast Grid supports a variety of browsers and emulated devices, including:
  • Chrome
  • Firefox
  • Microsoft Edge
  • Safari
  • Microsoft IE 10
  • Microsoft IE 11
  • iPhone and iPad devices
  • Samsung Galaxy devices
  • Kindle

See browsertype for a list of supported desktop browsers and devicename and iosdevicename for a complete list of supported mobile devices.

Ultrafast Grid functionality

Checkpoint generation consists of two basic processing steps - gathering all the resources (HTML, CSS, fonts images and so on) and generating an image of the full page, a process referred to as rendering. When a visual test is run without the Ultrafast Grid, the Eyes SDK interacts with a browser to capture one or more screen images that cover the entire web page, stitches the pages together and sends this to the Eyes server. When you setup the SDK to use the Ultrafast Grid, the SDK still interacts with the local browser, 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 Ultrafast Grid that generates the full page image and sends it to the Eyes Server to be matched against the baseline image.

The figure below illustrates how processing for a single step of a single test is partitioned with and without the Ultrafast Grid. The Ultrafast Grid architecture enables a significant performance boost both by transferring part of the functionality to cloud servers, providing an opportunity to take advantage of concurrency and cloud-based multi-processing.

A number of factors contribute to the potential performance gain when using the Ultrafast Grid:
  • The DOM data and resources sent by the test client is typically much smaller than the full page image, reducing the required bandwidth and the time taken to pass the data.
  • The system minimizes transmission overhead of this data by caching it on the Ultrafast Grid. The SDK running on the test computer only sends new information or information that has changed.
  • The Ultrafast Grid servers are optimized to generate full page screenshots at a fraction of the time it takes the SDK to stitch multiple viewport screenshots.
  • The test is executed once and the DOM information is sent once to the cloud, but it can be used to render and test multiple checkpoints on different browsers, viewport sizes, and devices. This not only provides a performance boost but simplifies your test and makes it more robust.
  • Multiple renderings of a checkpoint, multiple checkpoints, and multiple tests can all be processed concurrently in the cloud on multiple processors, allowing you to achieve short testing time with a large number of tests and test targets.

The figure below illustrates the concurrent data flows and processing when using the Ultrafast Grid to render multiple tests and multiple checkpoints on multiple browser configurations.

To summarize:
  • The test suite running on the test computer uses the Eyes SDK to configure the SDK for the target browsers and devices and to execute the checkpoints of one or more tests.
  • The Ultrafast Grid renders each checkpoint multiple times for each variation of browser configuration and/or viewport size.
  • In the Eyes Test Manager, you will see a batch of test results, one per test per configuration.

Types of rendering targets

There are three types of rendering targets:

  • Desktop browser: The page is rendered using a desktop browser running on a desktop environment. The desktop environment depends on the chosen browser type: Microsoft IE and Edge run on Windows, Safari runs on macOS and other browsers run on Linux. For a list of supported browsers see browsertype.
  • Emulated mobile device: The page is rendered using Chrome device emulation running on a desktop environment. The desktop environment and browser depend on the chosen device type. For a list of supported devices see devicename.
  • iOS mobile device:The page is rendered using a Safari browser running on a mobile device simulator. For a list of supported devices see iosdevicename.

When requesting a Desktop browser you also specify the required viewport size. When specifying a mobile device the viewport size is based on the device screen size and you simply specify if you want to render using portrait (vertical) or landscape (horizontal) screen orientation.

How to configure your test to use the Ultrafast Grid

Below is a code snippet that shows the minimal changes needed to use the Ultrafast 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, but the shaded code is all you need to add to run your test on the Ultrafast Grid with, for example, 6 configured platforms - including Chrome, Firefox, and IE 11 - in various viewport variations, and on emulated iPhone 4 and Galaxy S5 mobile devices:


                                

For a complete program see Writing visual tests that use the Ultrafast Grid

Running this test will produce 8 test results, so in the Eyes Test Manager you will see the following:

Summary

Using the Ultrafast Grid provides the following advantages:
  • Out-of-the-box cross-platform testing without the' need to build and maintain a QA lab with devices and browsers.
    • Just configure the platforms, devices, and viewport you want to test.
    • More robust and stable than solutions that use remote browsers and devices.
  • 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 the calls that create, pass, and call the VisualGridRunner object that manages the concurrency and the interaction with the Ultrafast Grid.