1. What is Applitools Eyes?
Applitools is a revolutionary platform for testing any type of user interface using Artificial Intelligence, including websites, web applications, native mobile apps, documents and media, and more. Where traditional testing uses automation tools to build tests that interact and validate scenarios like a machine, Applitools uses AI to validate thousands of elements and scenarios nearly instantly – interacting with the UI as a human would.

2. Benefits of Visual AI
2.1. Faster test creation
Applitools enables your development team to build comprehensive end-to-end tests faster, reducing the need to write an assertion for each element or feature.
2.2. Improved test coverage
With Applitools, our smart assertions validate the entire interface with a single command. Simply steer Applitools torwards the interface you’d like to validate, and we’ll map and organize every element with our algorithims and detect any meaningful changes in the future.
2.3. Automated analysis and maintenance
As new, expected changes are made to the UI, baselines are automatically updated and any deviations will be caught. This means that there is no need to create new tests for added functionality or update tests for changes. Simply accept the new baseline, and you’ve “created” a new test that validates the entire interface.
2.4. Test different types of content
Visual AI is not limited to traditional web and mobile applications. It can also be effectively used for testing PDF documents and other media, ensuring accuracy and correctness across a range of digital materials
2.5. Self-healing infrastructure reduces test flakiness
Teams can run their tests on Applitools Execution Cloud, intelligent test infrastructure that heals tests that fail due to small changes in the UI’s locators.
2.6. Testing is democratized
Visual AI enables teams of varying skill-sets to collate around a single platform for testing: with an easy to use UI image as the foundation.
3. Use Cases
3.1. Functional Testing
Catch functional egressions involving text changes, form input errors, navigation issues, calculation errors, spelling errors, and more with Visual AI.
3.2. Visual Testing
Find hard to spot errors like misaligned elements, overlapping elements, incorrect font or brand usage, wrong color schemes, missing elements, and more.
3.3. Accessibility Testing
Run accessibility tests using Contrast Advisor to make sure users are able to see your application without added impairment.
3.4. Localization Testing
For teams expanding globally, Visual AI allows teams to create baselines for each language and allowing SMEs to easily take part in the verification process.
3.5 A/B Test Coverage
Applitools Multibaseline feature enables teams to create multiple baselines to increase coverage for their A/B experiments in a single click.
3.6. Audits & Compliance
Validate PDFs and other legal documents at scale with Applitools
3.7. Brand Risk Mitigation
Catch errors in your Brand digital experience earlier than ever with the only automation tool built to test how your users see the app.
4. Overview of Visual UI Testing
4.1. Introduction
Visual testing is a type of regression testing that ensures previously correct screens have not changed unexpectedly.
Visual testing of an application is performed by running the application and saving screen snapshots at key points called checkpoints. These screenshots are then compared to previously stored baseline images, and any visually significant differences are reported.
4.2. Implementing Visual UI Testing
Implementing visual UI testing typically involves four basic steps:
- Write a test that exercises your application UI by simulating user interactions and capturing screenshots at key states.
- Compare the captured screenshots to previously captured baseline images.
- Review the detected differences:
- If a difference results from a new feature, accept the new screenshot, which becomes the new baseline image.
- If a difference indicates a bug, report the issue and reject the new image, keeping the existing baseline.
- Save the baseline updates so they are used for the next test run.
The very first time a test is run, there are no baseline images, so the captured screenshots are adopted as the baseline images. On subsequent runs, the process follows the steps described above.
This process is illustrated in the diagram below and the description that follows it.

The figure shows two phases: the upper row represents the first run, and the second row represents subsequent runs, which may be repeated multiple times (hence the arrow from step 8 to step 5. The numbering in the sections below corresponds to the numbering in the figure above.
4.3. First Run
| # | Step Description |
|---|---|
| 1) | Write a test script that exercises the UI by simulating multiple states and capturing screenshots at each checkpoint. |
| 2) | Run the test for the first time. |
| 3) | Since no baseline images exist, all checkpoints are marked as “new.” |
| 4) | All images captured during this run are automatically stored and used as baseline images in future tests. |
4.4. Subsequent Runs
| # | Step Description |
|---|---|
| 5) | Modify the application or test code. |
| 6) | Run the test again; differences are detected. In this example, the differences are marked as 1F and 3B in the figure. |
| 7) | Review the results:7A) Accept changes: If the difference results from a new feature, accept the image. Once saved, it becomes the new baseline image.7B) Reject changes: If the difference indicates a bug, report the issue and reject the image, keeping the existing baseline. |
| 8) | Save the updated baseline, which will be used as the reference for future test runs. |
5. Writing Visual Tests with Eyes
The heart of the visual test process consists of the following key steps, repeated as many times as required:
- Bring the UI to a known state.
- Execute a checkpoint:
- Capture an image of the application window in that state.
- Compare the checkpoint image to a baseline image, i.e., a previously captured image in that state known to be correct.
In an Eyes visual test, your test code uses a browser or native device driver such as Selenium or Appium to drive the application to a state you want to verify. The test then calls an Eyes SDK check method, which captures an image of the application window and sends it to the Eyes Server for processing.
The Eyes Server receives all the checkpoint images associated with the test and compares them to a baseline, which consists of the same sequence of images. The server sends back a test result that consists of a sequence of steps where each step indicates one of the following possibilities:
- Match: The checkpoint image is visually identical to the corresponding baseline image.
- Mismatch: The checkpoint image is visually different from the corresponding baseline image. Eyes has found a visual difference.
- New: The checkpoint is new; there is no corresponding baseline image.
- Missing: A checkpoint is missing; there is a baseline image with no corresponding checkpoint.
For further information about how Eyes compares a series of checkpoint images to baseline see How Eyes compares checkpoints and baseline images.
Once the test has run, you can review the results in the Eyes Test Manager to determine the cause of the differences (Mismatch, New, or Missing) that Eyes has detected. As part of the review, you can mark areas that indicate a bug that needs to be fixed or update the baseline to reflect a change in the UI. You can also make adjustments to the way the checkpoint image is compared with the baseline image, such as ignoring regions with dynamic data. For further information, see The Test Results Page.
5.1. Coding an Eyes Visual Test
The following describes a typical test line by line, explaining the key concepts supported by the SDK.
5.2. The Anatomy of a Single Test
The general pattern of a single test is as follows:
- Create an instance of the
eyesclass. - Call the
eyes.openmethod so that the SDK can initialize the connections with the browser driver and the Eyes Server. - For each required state, use the browser driver to set up that state and then call one of the
check()methods to execute a checkpoint. - After all the checkpoints are complete, call the
eyes.closeAsyncmethod to indicate to the Eyes Server that the test has completed.
In summary, a “test” in Eyes terminology refers to the sequence of check() calls made between the call to eyes.open and the call to eyes.closeAsync.
5.3. Running Multiple Tests with the Runner Class
Often, a test program consists of multiple tests. We refer to this as a test suite.
The recommended best practice is to use a new Eyes instance for each test. However, if necessary, you can run several tests one after the other using the same Eyes instance.
Eyes provides an entity called a Runner that manages access to Eyes services by multiple Eyes instances. You create a Runner before you create any of the Eyes instances, and after you run all the tests, you call the runner again to retrieve all the test results.
In the sections that follow, we focus on a single test, but we structure the code in a way that allows it to evolve naturally to support multiple tests in a test suite.
5.4. Setting Up a Test Run
To create a runner object that will be associated with all the Eyes instances, create a ClassicRunner, which captures raw screenshots from the application under test.Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
public void beforeTestSuite() {
runner = new ClassicRunner();
// continued below....
}
The VisualGridRunner is another type of runner that interacts with the Eyes Ultrafast Grid server to render the checkpoint images in the cloud, greatly reducing test execution time and allowing rendering on a variety of simulated and emulated environments. The code illustrated here is constructed in a way that makes it easy for you to transition to using the Ultrafast Grid in the future.
5.5. Configuring Tests
Set up configurations that are common to all tests using a Configuration object.Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
suiteConfig = new Configuration()
// Checkpoint configurations
.setForceFullPageScreenshot(true)
.setStitchMode(StitchMode.CSS)
.setHideScrollbars(true)
.setHideCaret(true)
.setViewportSize( new RectangleSize(viewPortWidth, viewPortHeight))
// Test suite configurations
.setApiKey(apiKey)
.setServerUrl(myEyesServer)
.setAppName(appName)
.setBatch(new BatchInfo(batchName)
/* ... more configurations */ );
Note the use of the fluent API style. Any configuration values that are not explicitly specified will have a default value.
Following is a brief explanation of each of these configurations.
configuration.setApiKey– To run an Eyes tests, you need an API Key, see How To Retrieve Your API Key. If you assign the key to an environment variableAPPLITOOLS_API_KEYthen the SDK automatically use its value, and you don’t need to configure it in the test.configuration.setServerUrl– Defines the URL of the Eyes Server. If using the public cloud, this is not required.configuration.setAppName– Defines a unique identifier for tests, combining the application name and test name.configuration.setViewportSize– In a responsive web design, different viewport sizes can result in different page content or layout. If the viewport size is the same for all your tests, then you can specify it here. Otherwise, you should set the viewport size for every test. For more information, see Using viewports.configuration.setBatch– Groups multiple tests into a single logical unit whose results appear together in the Eyes Test Manager. For further information, see Defining a Batch of Tests
The application name, viewport, test name, operating system, and browser type determine the baseline that Eyes uses to compare checkpoints.
5.6. Additional configuration options:
Two additional attributes that impact which baseline Eyes chooses are the operating system and browser type that you use to run the test. These are provided automatically by the SDK.
The example also shows some other configuration options that make good defaults, and can be changed on a per-checkpoint basis. Following is a brief description of these options:
configuration.setForceFullPageScreenshot– Iftrue, the entire page content is matched and not just the viewport.configuration.setStitchMode– When the entire page is matched, the page is scrolled to access the different parts of the page when generating the checkpoint image. This method defines the mechanism used to do this, and the value passed as a parameter is the recommended setting.configuration.setHideScrollbars– If true, the main scroll bar will be hidden before image capture. This is useful to hide artifacts that sometime cause mismatches with scroll bars.configuration.setHideCaret– Iftrue, the cursor is turned off before image capture. This helps to eliminate artifacts that can cause false mismatches because of a blinking cursor.
In summary, we have created a classicrunner and a configuration object. In the next section, we use these objects to set up the Eyes instance created for each test.
5.7. Setting Up the Eyes Instance for Each Test
Some settings must be configured at the test level.Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
eyes = new Eyes(runner);
eyes.setConfiguration(suiteConfig);
webDriver = new ChromeDriver();
To modify the configuration:
- Create the eyes instance by calling the constructor, passing it the runner object that was created previously.
- Use the eyes.setConfiguration method, passing it the
suiteconfigobject to apply the Suite Configuration values we set up previously to the Eyes instance.
Note that this method sets all the configuration values, either to the values defined explicitly or to the SDK default values. In the next section, we describe how you can change only specific configuration values.
5.8. Test specific configuration
A test may need some test-specific configuration. For example, we configured the application name in the global configuration since it is common to all the tests. Now in the test, we need to configure the test name:Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
Configuration testConfig = eyes.getConfiguration();
testConfig.setTestName("Hello World test");
eyes.setConfiguration(testConfig);
Note the sequence to change only one specific configuration value:
- Call
eyes.getConfigurationto get the current configuration values. - Make changes to the current configuration.
- Set the updated configuration using the method
eyes.setConfiguration.
5.9. Starting the Test
Start the test by calling eyes.open.Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
WebDriver driver = eyes.open(webDriver);
The method takes as a parameter a webdriver object. The method returns a webdriver object that is a wrapper of the driver passed as a parameter. Use the returned webdriver object to make the calls you need to the web driver to simulate the application events. This allows Eyes to know what user actions were performed before each visual checkpoint. This information is used in the test Editor when you play back a test.
5.10. Adding Checkpoints to Your Test
The following snippet illustrates a simple test with two checkpoints:Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
// Visual checkpoint #1.
driver.get("https://applitools.com/helloworld"); // navigate to website
eyes.checkWindow("Before mouse click");
// Visual checkpoint #2
driver.findElement(By.tagName("button")).click(); // Click the button.
eyes.checkWindow("After mouse click");
In the simplest case, as is done here, you can check the entire browser window with a call to eyes.checkWindow. If you have tests that need to test only parts of the window, or need other special treatment, then consider using the eyes.check method which supports a fluent API that provides many powerful options.
The string passed to eyes.checkWindow is a descriptive tag. Eyes does not use this string to identify the checkpoint. You can change the tag, it does not need to be unique, and is optional. However, providing a unique tag for every checkpoint is good practice, since it makes it easier for you to associate a result you see in the Eyes Test Manager to the corresponding checkpoint in the code.
5.11. Closing the Test
After you have completed all the checks in a test you need to inform the Eyes server that the test has ended:Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
if (testPassed) {
// Close the Eyes instance, no need to wait for results, we'll get those at the end in afterTestSuite
eyes.closeAsync();
} else {
// There was an exception so the test may be incomplete - abort the test
eyes.abortAsync();
}
webDriver.quit();
If the test completed normally, then you call the eyes.closeAsync method. If the test aborted, then you call the method eyes.abortAsync, and the status of the test displayed in the Eyes Test Manager is Aborted. How you detect that a test aborted depends on your test infrastructure.
5.12. Wrapping up the test suite run
After running and closing all the tests, you obtain the results of the tests using the runner method classicrunner.getAllTestResults as shown in the example below:Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
//Wait until the test results are available and retrieve them
TestResultsSummary allTestResults = runner.getAllTestResults(false);
for (TestResultContainer result : allTestResults) {
handleTestResults(result);
}
- The call to
classicrunner.getAllTestResultsreturns an iterator that you can use to loop through the test results of each test. - The object returned by the iterator,
testResultContainer, supports the following methods or properties:testResultContainer.getException.morpReturns a non-null status value if a failure prevented the test from completion.testResultContainer.getTestResults.morpReturns aTestResultsobject which contains the detailed results of each test or a null if an exception occurred and test results are not available.
- The
classicrunner.getAllTestResultsmethod takes an optional Boolean parameter that determines what happens if Eyes finds mismatches in any of the tests. If the parameter istrue, or no parameter is passed, then an exception is raised if any test had an exception or mismatch of any sort. If you want your test framework to capture and handle the exceptions in the same way as any other assertion failure in your test, then passtrue. If you want to generate a custom report or otherwise process the test result programmatically upon test completion, then passfalseas the parameter value and use the returned object to extract the information you need.
5.13. Defining a Batch of Tests
When you view test results in the Eyes Test Manager, the test results are structured by batches and tests, where each batch contains one or more tests. Where tests are logically related, organizing tests into batches makes it convenient to compare results, find common issues, and in general manage the results and status of tests.
By default, when using a runner, all the tests (i.e., every call to eyes.open) executed using the runner are displayed in a default batch. Typically it is preferable to explicitly group batches so that you can give the batch a descriptive name. You do this by creating and using a batchinfo object. In this example, when setting up the test suite, a batchInfo object was created and the batchinfo object was configured using the method configuration.setBatch. Then, when we configured the test, we assigned the suiteconfig object to the Eyes instance. Extracting the relevant lines of code, the following sequence of calls shows how the Eyes object becomes associated with the batch:Select SDK
An example for Cypress is not currently available. The example below is using Selenium for Java
BatchInfo batchInfo = new BatchInfo(batchName);
suiteConfig.setBatch(batchInfo);
eyes = new Eyes(runner);
eyes.setConfiguration(suiteConfig);
WebDriver driver = eyes.open(webDriver,appName,testName, viewportSize);
For more information about how you can take advantage of batches see Batching Test Runs. In particular, if your test suite uses multiple runners, or runs tests on multiple machines or processes and you want the tests to be in the same batch, then you need to explicitly set the batch id as described in this article.
5.14. Summary
To summarize the process, an Eyes visual test is based on the following main objects:
Eyes– Use an object of this class to execute a single visual test. You create anEyesobject for each test, configure it, call theopenmethod to start the test, execute one or more checkpoints by using methods such ascheck, and finally call theeyes.closeAsyncmethod to tell Eyes that there are no more checks in the test. At this point the Eyes server may still be processing the checkpoints of this test, but your test program can proceed with the next test in parallel (on supported SDKs).Runner– Use an object of this type when executing multiple Eyes instances in a single run to orchestrate the execution of the entire test suite. The runner manages the interaction between the Eyes instances and the Eyes servers. You create a runner before all the tests start, run all the tests, and after all the tests been closed, you call the runner to wait for all the tests to complete and to get their results.Configuration– An object that is used to configure Eyes capture and processing activities.
Although you can configure the Eyes object directly, it is convenient to set up a configuration object with the common settings, and then apply it to every Eyes instance before the test starts.
The figure below illustrates the flow of commands when running a test suite, it illustrates that a runner session encloses one or more tests, and each tests includes one or more checkpoints.

6. Applitools Testing Lifecycle
6.1. Workflow Overview
The typical workflow is outlined by the following steps:
- Run tests to establish baselines
- On subsequent runs, review the test status
- Analyze differences flagged by Applitools’ Visual AI (if any)
- Resolve issues in application (if necessary)
- Repeat
6.2. Execute Automation Tests
Everything starts with the execution of the automation tests.
6.3. Review Test Status
When you run a test for the first time, the test status is . This status means that there is no existing Baseline to perform a Visual AI comparison against so this test is saved as the baseline going forward.
On subsequent runs, after the baseline has been established, the test status will either be or
. If the test status is
, the Applitools Visual AI didn’t find any differences between the previous version of your application (baseline) and the current version (checkpoint). In the
case, no further action is required.
6.4. Analyze Differences Found
If the test status is PASSED, the Applitools Visual AI found differences and we must now review them. Differences are either a defect/visual bug that we need to resolve, such as broken CSS styling, or they’re an expected change, such as adding an input to a web form. The differences found will be highlighted in pink as shown below:

If it’s an unexpected change, we should reject this test by pressing the Reject button shown below:

This will mark the test as Declined and will not update the baseline image for this test.
If it’s an expected change, we should accept this test by pressing the Accept button shown below:

This will mark the test as Complete and will replace the old baseline image with the new checkpoint image. Every subsequent test run will now be compared to this updated version of the application under test.
6.5. Resolve Issues
If we have any failed tests where visual bugs were detected, we can then use tools like RCA to analyze the root cause of the issue, resolve the problem in the application and prepare for another test run.
7. Integrations
Applitools offers a variety of integrations with popular third party applications.
7.1. Source Control Integrations
7.2. Team Collaboration
- Batch Completion Notifications (Email, Slack and Microsoft Teams)
- JIRA