YAML for Visual tests

View as Markdown

Run visual regression tests using Visual Test 2.0 with enhanced features.

YAML parameters for Visual tests

PARAMETERS
visual_tests_suiterequiredstring
The name of the visual test suite to run tests against.
typerequiredstring

Value: VISUAL_TEST_2

actionrequiredstring
Unique identifier for the action within the pipeline.
urlsstring[]
URLs to compare (comma separated list, e.g., https://example.com,https://example.org). At least one of urls, sitemap or urls_file is required.
sitemapstring
URL from which sitemap will be gathered
urls_filestring
File with URLs to compare
ignore_urlsstring[]
Ignore URLs matching the regex pattern
follow_linksboolean
Scrap all subviews of the page. Default: false
respect_robotsboolean
Respect robots.txt. Default: false
ignoresstring[]
Ignore elements matching selectors while comparing (format: [scope::]type=value, e.g., "CSS=.ad-banner" or "XPATH=//div[@id='popup']" or "example.com::CSS=.cookie-notice")
cookiesstring[]
Set cookies used when visiting the URLs (format: [scope::]cookie_value, e.g., "session=abc123" or "example.com::auth=token123; Path=/; Secure; HttpOnly")
headersstring[]
Set HTTP headers used when visiting the URLs (format: [scope::]name=value, e.g., "Authorization=Bearer token" or "example.com::Accept=application/json")
delaysstring[]
Add delay in milliseconds before taking screenshot (format: [scope::]milliseconds, e.g., "1000" or "example.com::2000")
wait_for_elementsstring[]
Wait for elements to appear before taking screenshot (format: [scope::]type=value, e.g., "CSS=#content" or "example.com::XPATH=//div[@class='loaded']")
targets(string | TargetYaml)[]
The list of target servers or clusters. Each item is a target definition or a filter matching existing targets by identifier: a plain string such as sd* (* as a wildcard) or an object with type: MATCH.
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
The list of variables for dynamic action execution. The action runs once for each value.
run_only_on_first_failureboolean
When true, the action runs only on the first failure instead of on each failure. Used only when trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds. It cannot exceed the action time limit of the workspace plan; a higher value is rejected.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.

Constraints: ≤ 10

run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Last modified on Nov 2, 2026

YAML examples for Visual tests

Visual Regression Test

yaml
- action: "Visual Regression Test"
  type: "VISUAL_TEST_2"
  trigger_time: "ON_EVERY_EXECUTION"
  visual_tests_suite: "my-test-suite"
  urls:
    - "https://example.com"
    - "https://example.com/about"
  sitemap: "https://example.com/sitemap.xml"
  urls_file: "urls.txt"
  ignore_urls:
    - "https://example.com/admin"
  follow_links: true
  respect_robots: true
  ignores:
    - ".dynamic-content"
  cookies:
    - "session=abc123"
  headers:
    - "Authorization: Bearer token"
  delays:
    - "1000"
  wait_for_elements:
    - "#main-content"