Skip to main content

ChromiumOS Testing on Sauce Labs

Sauce Labs supports automated web testing on ChromiumOS virtual machines. ChromiumOS is the open-source platform behind Google's ChromeOS — it shares the same Chromium browser engine, rendering pipeline, and web platform APIs. You can validate your web applications against the same browser behavior that real ChromeOS users experience, directly from the Sauce Labs cloud.

What You'll Need​

  • A Sauce Labs account (Log in or sign up for a free trial)
  • Your Sauce Labs SAUCE_USERNAME and SAUCE_ACCESS_KEY (find them in User Settings)
  • A Selenium or WebDriver test framework configured to run against a remote endpoint, or Playwright using its Selenium Grid support
  • (Optional) Sauce Connect 5 installed and a tunnel started, if you need to test applications behind a firewall or on a staging environment

How ChromiumOS Relates to ChromeOS​

ChromiumOS is the open-source foundation of Google's ChromeOS. The two share the same browser engine and web platform behavior. ChromeOS adds Google-proprietary features like the Play Store and Google Assistant — none of which affect web application testing. For web testing purposes, ChromiumOS provides functionally equivalent coverage to ChromeOS.

How to Run Tests on ChromiumOS​

Live Testing​

You can run interactive manual testing sessions on ChromiumOS virtual machines through the Sauce Labs Live Testing interface.

  1. Navigate to Live Testing > Cross Browser in Sauce Labs.
  2. Select a current Chrome version from the browser version dropdown. Only the two latest Chrome versions are offered for ChromiumOS.
  3. In the OS Version selector, choose ChromiumOS.
  4. Click Start Test Session to launch the virtual machine.
Scrolling in Live Testing

ChromiumOS live testing sessions use touch-based scrolling. To scroll the page, click and drag inside the browser viewport — standard mouse wheel or trackpad scrolling is not supported.

Automated Tests​

Set the following capabilities in your test configuration to target a ChromiumOS virtual machine on Sauce Labs. ChromiumOS supports the current and previous Chromium releases, which are kept up to date as part of our regular browser updates. We recommend using latest or latest-1 for browserVersion to stay on those versions automatically.

CapabilityValue
platformNameChromiumOS
browserNamegooglechrome
browserVersionlatest
ChromiumOS Test Configuration
ChromeOptions options = new ChromeOptions();
options.setPlatformName("ChromiumOS");
options.setBrowserVersion("latest");

Map<String, Object> sauceOptions = new HashMap<>();
sauceOptions.put("username", System.getenv("SAUCE_USERNAME"));
sauceOptions.put("accessKey", System.getenv("SAUCE_ACCESS_KEY"));
sauceOptions.put("name", "<your test name>");
options.setCapability("sauce:options", sauceOptions);

WebDriver driver = new RemoteWebDriver(
new URL("https://ondemand.us-west-1.saucelabs.com:443/wd/hub"),
options
);

No additional flags or special capabilities are required to launch a session — set the platform to ChromiumOS and use the standard Chrome browser and Sauce options.

Playwright (via Selenium Grid)​

You can also run Playwright tests against ChromiumOS virtual machines using Playwright's Selenium Grid support. Playwright creates the session over WebDriver and then drives the browser over the Chrome DevTools Protocol (CDP), so your test code is the same as the code you run locally.

Set the SELENIUM_REMOTE_URL and SELENIUM_REMOTE_CAPABILITIES environment variables before your test command, with platformName set to ChromiumOS:

Running Playwright on ChromiumOS
export SELENIUM_REMOTE_URL=https://ondemand.us-west-1.saucelabs.com:443/wd/hub
export SELENIUM_REMOTE_CAPABILITIES='{"platformName":"ChromiumOS","browserName":"chrome","browserVersion":"latest","sauce:options":{"devTools":true,"username":"'$SAUCE_USERNAME'","accessKey":"'$SAUCE_ACCESS_KEY'","name":"<your test name>"}}'
npx playwright test --headed
CapabilityValue
platformNameChromiumOS
browserNamechrome or googlechrome
browserVersionlatest
sauce:options.devToolstrue

devTools: true is what makes Sauce Labs return the CDP endpoint that Playwright connects to. Run your tests in headed mode so that Sauce Labs can record video.

Playwright Support

Playwright's Selenium Grid support is experimental in Playwright itself, and only Chromium-based browsers can be driven this way — so Chrome is the only browser available for Playwright on ChromiumOS. For JavaScript, Java, Python, and .NET setup examples, recommended fixtures, and known limitations, see Playwright on Selenium Grid.

Configuring Screen Resolution​

ChromiumOS virtual machines support multiple screen resolutions. If you don't set a screenResolution capability, sessions launch at the default resolution of 1920x1080.

To request a specific resolution, set screenResolution inside sauce:options:

ResolutionAspect RatioNotes
1280x72016:9HD — smallest supported size
1366x76816:9common Chromebook native resolution
1536x86416:9
1600x90016:9
1920x108016:9Full HD
2880x162016:9QHD+ — largest supported size
Setting screenResolution
sauceOptions.put("screenResolution", "1920x1080");
options.setCapability("sauce:options", sauceOptions);
Unsupported Resolutions

Requesting a screenResolution value outside the supported list will cause your session to fail to start. Always pick a value from the table above.

Using Sauce Connect Tunnels​

ChromiumOS testing supports Sauce Connect 5 tunnels for reaching applications behind a corporate firewall or hosted on a staging environment. Start a tunnel using the Sauce Connect 5 client, then route your test traffic through it by setting the tunnelName capability under sauce:options. If you're using a tunnel owned by another user in your organization, also set tunnelOwner.

CapabilityTypeDescription
tunnelNamestringThe name of the running Sauce Connect 5 tunnel.
tunnelOwnerstringThe Sauce Labs username of the tunnel owner. Required only when the tunnel is owned by another user.
Routing Through a Tunnel
sauceOptions.put("tunnelName", "<your-tunnel-name>");
// Required only for shared tunnels owned by another user:
sauceOptions.put("tunnelOwner", "<tunnel-owner-username>");
options.setCapability("sauce:options", sauceOptions);
Sauce Connect Version

ChromiumOS supports Sauce Connect 5 only. Earlier Sauce Connect versions are not compatible with ChromiumOS sessions. If you're upgrading, see the Sauce Connect 5 migration guide.