Documentation

Clouds
Docs
βœ“ API
βœ“ Reports
βœ“ Clouds

Resources

Video


> TestContainers

> LambdaTest

> BrowserStack

> Saucelabs

> Selenoid

> Other cloud providers



The easiest, fastest and most reliable way is to launch a browser on the same machine with the test (the so-called β€œlocal” launch). Or maybe in a Docker container on the same machine.

But people are not looking for simple ways. Sometimes they want to run the browser in the clouds. In theory, this can give you some advantages: infinite scaling and running different versions of different browsers. But of course, there are also difficulties and limitations.

Selenide allows you to do this quite easily. To run a browser remotely, you need to use setting remote:

Configuration.remote = "https://your-cloud-provider.com/wd/hub";

TestContainers

Allows running a browser in a docker container with just one annotation.

A working example: selenide-examples/testcontainers.

Pros:

  1. Allows running different browser versions
  2. Can save video from test running (and many other features of TestContainers)
  3. Most Selenide features still work (screenshots, proxy, CDP etc.)

Cons:

  1. Some Selenide features may not work (e.g. clipboard)
  2. Only those browsers are supported that are capable of running in Docker (Internet Explorer is definitely not, not sure about Safari)


LambdaTest

A working example: selenide-examples/selenide-lambdatest.
Website: LambdaTest.com.

This is a working example of Selenide tests that run the browser on LambdaTest servers. As you can see, the settings there are minimal:

  Configuration.remote = "https://hub.lambdatest.com/wd/hub";
  Configuration.browserCapabilities.setCapability("LT:Options", Map.of(
    "user", "unclebob",
    "accessKey", "0123456789001234567890"
));

Pros:

  1. Allows running different browser versions

Cons:

  1. Some Selenide features may not work (e.g. clipboard, proxy, download to folder)


BrowserStack

A working example: selenide-examples/selenide-browserstack.
Website: BrowserStack.com

This is a working example of Selenide tests that run the browser on BrowserStack servers. As you can see, the settings there are minimal:

  Configuration.remote = "https://hub-cloud.browserstack.com/wd/hub";
  Configuration.browserCapabilities.setCapability("bstack:options", Map.of(
    "userName", "unclebob",
    "accessKey", "0123456789001234567890"
  ));

Pros:

  1. Allows running different browser versions

Cons:

  1. Some Selenide features may not work (e.g. clipboard, proxy, download to folder)


Saucelabs

Saucelabs company also allows running browsers and mobile apps on their servers.

An example (this is quite old, but we hope to update it soon).

Pros:

  1. Allows running different browser versions

Cons:

  1. Some Selenide features may not work (e.g. clipboard, proxy, download to folder)


Selenoid

Like Selenium Grid, but in docker. And it’s written in Go, so it’s fast and uses little memory.

A working example on GitHub

Pros:

  1. Directly supported by Selenide

    1.1. Is easily pluggable as a Selenide extension β€˜com.codeborne:selenide-selenoid:7.6.0’
    1.2. Supports some Selenide features (that may not work in other clouds): clipboard, downloading files.

  2. Allows running different browser versions
  3. Can save video from running tests

Cons:

  1. Only those browsers are supported that are capable of running in Docker (Internet Explorer is definitely not, not sure about Safari)


Other cloud providers

In theory, other cloud providers should integrate just as easily.

What other providers have you tried? Pros, cons, pitfalls? Tell us, share the code.

And the most important, was it worth it? Tell us, what kind of problems does remote browser run solve, why was it worth sacrificing speed, convenience and some features?