Applitools Plugin
The plugin provides the ability to perform visual testing using the Applitools visual testing platform.
Installation
implementation(group: 'org.vividus', name: 'vividus-plugin-applitools', version: '0.4.8')
Properties
General properties
The properties marked with bold are mandatory. |
Property Name | Default | Description |
---|---|---|
|
The URI of the rest server. |
|
|
|
Allows users to execute tests but does not allow them to access the tests and test results, change data through the API, or make any changes to the tests. For more details see how to obtain API keys. |
|
|
Allows users to access tests and test results, but does not allow them to execute tests, change data through the API, or make any changes to the tests. For more details see how to obtain API keys. |
|
|
|
|
|
The name of the application under test. |
Cross-environment properties
See cross-environment testing for more details.
Property Name | Default | Description | web.visual.applitools.host-os |
---|---|---|---|
|
The host OS running the application under test. |
|
|
The application running the application under test (e.g. Safari, Chrome). |
|
|
The required viewport size for the environment. |
Common visual testin actions use cases
ESTABLISH
Creates a baseline image.
Given I am on a page with the URL 'https://example.com/'
When I run visual test with Applitools using:
|appName |batchName |baselineName |action |
|example.com|example-testing|main-app-page|ESTABLISH|
Established baseline on Applitools

Established baseline details

COMPARE_AGAINST
Compares actual appearance of the page or element against the baseline. Make sure that the baseline you compare against actually exists.
Given I am on a page with the URL 'https://example.com/'
When I run visual test with Applitools using:
|appName |batchName |baselineName |action |elementsToIgnore|
|example.com|example-testing|main-app-page|COMPARE_AGAINST|By.tagName(h1) |
Comparison result against the established baseline on Applitools

Comparison result details

CHECK_INEQUALITY_AGAINST
Work the same way as COMPARE_AGAINST
except it checks if actual appearance differs from the baseline.
Given I am on a page with the URL 'https://example.com/'
When I run visual test with Applitools using:
|appName |batchName |baselineName |action |elementsToIgnore|
|example.com|example-testing|main-app-page|CHECK_INEQUALITY_AGAINST|By.tagName(h1) |
Steps
Visual check with default Applitools configuration
Performs visual check on the Applitools visual testing plarform.
When I $actionType baseline `$testName` in batch `$batchName` with Applitools
-
$actionType
- The `ESTABLISH`, `COMPARE_AGAINST` or `CHECK_INEQUALITY_AGAINST`. -
$testName
- The name of the baseline (visual test name). -
$batchName
- The name of the batch (group of visual tests).
When I ESTABLISH baseline `main-app-page` in batch `example-testing` with Applitools
Visual check with custom Applitools configuration
Performs visual check on the Applitools visual testing plarform with custom Applitools configuration.
Properties in the custom Applitools configuration provided in step take presendence over properties specified in configuration files.
It’s possible to perform several visual testing checks at once by passing several Applitools configuration into step.
When I run visual test with Applitools using:$applitoolsConfigurations
The expression parameters marked with bold are mandatory. |
-
$applitoolsConfigurations
- The Applitools configurations-
action
- The `ESTABLISH`, `COMPARE_AGAINST` or `CHECK_INEQUALITY_AGAINST`. -
batchName
- The name of the batch (group of visual tests). -
baselineName
- The name of the baseline (visual test name). -
matchLevel
- The match level. -
appName
- The name of the application under test. -
elementsToIgnore
- The comma separated list of locators of elements to ignore. -
areasToIgnore
- The comma separated list of locators of page areas to ignore. -
hostApp
- The application running the application under test (e.g. Safari, Chrome). -
hostOS
- The host OS running the application under test. -
viewportSize
- The required viewport size for the environment. -
baselineEnvName
- The name of the baseline’s environment. -
searchContext
- The locator of a search context -
readApiKey
- The key to execute tests. -
executeApiKey
- The key to access tests and test results. -
serverUri
- The URI of the rest server.
-
When I run visual test with Applitools using:
|appName |action |batchName |baselineName |matchLevel|
|Demo app|COMPARE_AGAINST|example-testing|main-page-app|EXACT |
Visual check with custom Applitools and screenshot configuration
Performs visual check on the Applitools visual testing plarform with custom configuration and screenshot strategy.
Properties in the custom Applitools configuration provided in step take presendence over properties specified in configuration files.
It’s possible to perform several visual testing checks at once by passing several Applitools configuration into step.
When I run visual test with Applitools using:$applitoolsConfigurations and screenshot config:$screenshotConfiguration
The expression parameters marked with bold are mandatory. |
-
$applitoolsConfigurations
- The Applitools configurations-
action
- The `ESTABLISH`, `COMPARE_AGAINST` or `CHECK_INEQUALITY_AGAINST`. -
batchName
- The name of the batch (group of visual tests). -
baselineName
- The name of the baseline (visual test name). -
matchLevel
- The match level. -
appName
- The name of the application under test. -
elementsToIgnore
- The comma separated list of locators of elements to ignore. -
areasToIgnore
- The comma separated list of locators of page areas to ignore. -
hostApp
- The application running the application under test (e.g. Safari, Chrome). -
hostOS
- The host OS running the application under test. -
viewportSize
- The required viewport size for the environment. -
baselineEnvName
- The name of the baseline’s environment. -
searchContext
- The locator of a search context -
readApiKey
- The key to execute tests. -
executeApiKey
- The key to access tests and test results. -
serverUri
- The URI of the rest server.
-
-
$screenshotConfiguration
- The screenshot configuration
When I run visual test with Applitools using:
|appName |action |batchName |baselineName |matchLevel|
|Demo app|COMPARE_AGAINST|example-testing|main-page-app|EXACT |
and screenshot config:
|webFooterToCut|screenshotShootingStrategy|
|50 |SIMPLE |