Skip to main content

Runner Configuration

You can choose between two types of runners:

  • Ultrafast grid (UFG): Allows you to perform cross-browser testing by rendering your application across multiple browsers and devices in the cloud. Note: This option requires an active Ultrafast Grid license to use.
  • Classic runner: Runs visual tests on your local machine without cross-browser rendering.

Selecting the runner type

  • type (string):
    Specifies the runner type.
    Default: 'classic'.
    Possible values:
    • 'ufg': Uses the Ultrafast Grid for cross-browser testing (requires UFG license).
    • 'classic': Uses the Classic runner for local testing.
type: 'ufg',

Ultrafast grid (UFG) configuration

The following options are relevant when using the Ultrafast Grid runner (type: 'ufg').
Note: Using the Ultrafast Grid requires a license.

Rendering and browser configuration

  • browsersInfo (array):
    Specifies the browsers, devices, and viewport sizes for cross-browser testing with UFG. Learn more here about supported browsers and devices.

    Default: Runs in the same browser and viewport size as the local test.
    Each entry can be:

    • Desktop browser:
browsersInfo: [
{ name: 'chrome', width: 800, height: 600 },
{ name: 'firefox', width: 1024, height: 768 },
],
  • Mobile emulation:
{
chromeEmulationInfo: {
deviceName: 'iPad 7th Gen',
screenOrientation: 'landscape',
},
},
  • iOS device:
{
iosDeviceInfo: {
deviceName: 'iPad (7th generation)',
iosVersion: 'latest',
screenOrientation: 'portrait',
},
},

Example:

browsersInfo: [
{ name: 'chrome', width: 800, height: 600 },
{ name: 'firefox', width: 1024, height: 768 },
{
iosDeviceInfo: {
deviceName: 'iPhone 16',
screenOrientation: 'portrait',
},
},
],
  • layoutBreakpoints (boolean | number[]):
    Enables responsive design testing at specified breakpoints.

    Default: false.

    • If true, breakpoints are inferred from the application's CSS.
    • If an array of numbers, specifies the widths at which to capture screenshots

    Note: This option is relevant only for UFG. It allows the SDK to fetch viewport-specific resources, which are subsequently used for rendering on the UFG. This is rarely needed, but when necessary, it's crucial for accurate rendering.

layoutBreakpoints: [320, 768, 1024],

Concurrency configuration

  • testConcurrency (number):
    The maximum number of visual tests to run concurrently in the Ultrafast Grid.

    Default: 5.

testConcurrency: 10,
  • fetchConcurrency (number):
    The maximum number of resources to fetch concurrently when rendering pages in the Ultrafast Grid.

    Default: 5.

fetchConcurrency: 5,

Ultrafast grid options

  • visualGridOptions (object):
    Additional options for the Ultrafast Grid rendering.

    Default: No additional options are set.

    • chromeHeadless (boolean):
      Set to false to use regular Chrome instead of Headless Chrome.

      Default: true.

    • polyfillAdoptedStyleSheets (boolean):
      Controls the polyfill for Adopted StyleSheets.

      Default: false.

visualGridOptions: {
chromeHeadless: false,
polyfillAdoptedStyleSheets: true,
},

Classic runner configuration

When using the Classic runner (type: 'classic'), you run visual tests locally without the cross-browser rendering capabilities of the Ultrafast Grid.

  • viewportSize (object):
    The viewport size for the tests.

    Default: Playwright's default viewport size.

viewportSize: { width: 1280, height: 720 },
  • stitchMode (string):
    The stitch mode to use when capturing full-page screenshots.

    Possible values:

    • 'Scroll': Uses scrolling to stitch screenshots.
    • 'CSS': Uses CSS transforms to stitch screenshots.

    Default: 'CSS'.

stitchMode: 'Scroll',
  • stitchOverlap (number):
    The overlap in pixels between stitched parts. Only relevant for stitchMode: 'Scroll'

    Default: 50 pixels.

stitchOverlap: 50,