Sauce Labs Integration

Screener integrates with Sauce Labs's Testing Cloud for Cross Browser Testing.

To learn more about Screener's Cross browser Testing, please view our Cross Browser Testing documentation.

Important Notes about Cross Browser Testing with Sauce Labs:
  • Cross Browser Testing with Sauce Labs will be slower than regular Screener visual regression tests.
  • You may want to limit cross browser testing to certain scenarios, such as only when merging into master (see example below).
  • Requirements: A valid Sauce Labs account, and access to enough concurrency in your Sauce account to run Screener tests. Each browser/resolution combination will use one concurrent machine.

  1. Adding Sauce Labs Browsers
  2. Supported Browsers
  3. Sauce Connect Integration

Adding Sauce Labs Browsers

To test Safari or Edge browsers, a Sauce Labs account is required, and your Sauce credentials need to be added via the sauce option in your screener.config.js file. Browsers added must match one of the supported browsers/versions in the browser table below.

Here is a CircleCI example that only runs cross browser tests when committing into master branch:

var config = {
  // regular screener config
// only run cross browser tests when merging into 'master' branch
if (process.env.CIRCLE_BRANCH === 'master') {
  config.browsers = [
      browserName: 'chrome'
      browserName: 'microsoftedge',
      version: '17.17134'
      browserName: 'safari',
      version: '11.1'
  config.sauce = {
    username: 'sauce_user',
    accessKey: 'sauce_access_key',
    maxConcurrent: 10
module.exports = config;

Supported Browsers

microsoftedge17.17134requires Sauce Account
safari11.1requires Sauce Account

Sauce Connect Integration

When using Sauce Labs browsers, you have the option to use the Sauce Connect tunnel by setting the flag launchSauceConnect: true. When enabled, Sauce Connect will be launched and managed by this module, and assigned a unique tunnel identifier.

module.exports = {
  sauce: {
    username: 'sauce_user',
    accessKey: 'sauce_access_key',
    maxConcurrent: 10, // optional available concurrency you have from Sauce Labs
    launchSauceConnect: true // enable Sauce Connect
Important Notes on Sauce Connect
  • Using Sauce Connect version `4.5.4`.
  • Sauce Connect Integration requires all browsers to be Sauce Labs Browsers. An error is thrown when using non-Sauce browsers.
  • Logs for Sauce Connect are saved in the root of your project under sauce-connect.log for debugging purposes.
  • Sauce Connect tunnel cannot be used together with the tunnel: option.
  • A unique tunnelIdentifier is automatically generated for you when using the Sauce Connect Integration. An error is thrown when tunnelIdentifier is set manually.
  • When running Sauce Connect tunnel on your localhost, please note that Sauce Connect only supports a limited set of valid ports.
  • For additional information on Sauce Connect please refer to the Sauce Connect FAQ and Sauce Connect Troubleshooting documentation.

Got Questions? Ask Us