Docs sauce vs local

The Sauce Difference

When you run your tests in the cloud, you get all the security and optimization features Sauce offers. How does using Sauce differ from running your test suite locally, and how do we set up our machines?

Pristine VMs

Each test is run in its own, freshly booted, secure virtual machine. The Sauce servers have a variety of brand-new VMs spun up at any point, so one is almost always ready when you need it. On the rare chance that the type of VM you've requested isn't available, we create one (in less than a minute) and don't charge you for boot time. After your test runs, that machine is destroyed.

A brand-new machine guarantees security and repeatability for every test:

  • Free of settings from previous browser sessions
  • Free of cached information and cookies
  • A fresh, tamper-free machine state: You are the first user of each VM!

Consistent browser configurations

All Sauce VMs with a particular OS/browser combination are identically configured, so you can be sure you're working with the same setup every time. Selenium performs a variety of optimization and dialog-box prevention measures; since these don't cover Internet Explorer, we apply our own set of registry edits to accomplish this.

Pop-up handling and uploads

Before launching Selenium, each VM starts our pop-up handler, a Python script called whackamole. The script runs in the background and kills pop-ups as they surface (AutoIT style). This script also handles uploads in Selenium 1 (RC).

Since Selenium 2 (WebDriver) handles pop-ups and uploads by itself, whackamole is disabled for those tests. If desired, you can also manually disable it for Selenium 1: disable-popup-handler

Proxying

When you run your tests on Sauce, all browser requests are sent through Selenium's HTTP proxy server, which enables our browsers to accept any self-signed certificate. In rare cases - such as if your webserver drops a connection partway through - the Selenium proxy server can cause problems for some users. If you experience this, you can configure Sauce Labs to skip the proxy server and make the browsers communicate directly with your servers: avoid-proxy

Note: If you're using Sauce Connect, the proxy cannot be avoided.

Hardware and VM specs

Our own extensive tests demonstrate that Sauce VMs perform on par with a modern professional-grade laptop.
Our colocated servers are held in Mountain View, CA. Since Sauce allows you to parallelize tests, any latency due to data transfer through the internet is counteracted by running tests concurrently.