Cloud Grids BrowserStack and LambdaTest

Why a Cloud Grid

Cloud grids (BrowserStack, LambdaTest, Sauce Labs) host thousands of real browser and OS combinations, including Safari on macOS and real mobile devices, which are hard to run yourself. You pay per parallel session. The code is still RemoteWebDriver; only the URL and vendor options change.

ChromeOptions options = new ChromeOptions();
options.setPlatformName("Windows 11");
options.setBrowserVersion("latest");

Map<String, Object> bstack = new HashMap<>();
bstack.put("userName", System.getenv("BROWSERSTACK_USERNAME"));
bstack.put("accessKey", System.getenv("BROWSERSTACK_ACCESS_KEY"));
bstack.put("projectName", "ShopEase");
bstack.put("buildName", "regression-" + System.getenv("GITHUB_RUN_NUMBER"));
bstack.put("sessionName", "checkout with UPI");
options.setCapability("bstack:options", bstack);

WebDriver driver = new RemoteWebDriver(
        URI.create("https://hub-cloud.browserstack.com/wd/hub").toURL(), options);

LambdaTest and Comparison

Map<String, Object> lt = new HashMap<>();
lt.put("username", System.getenv("LT_USERNAME"));
lt.put("accessKey", System.getenv("LT_ACCESS_KEY"));
lt.put("build", "ShopEase nightly");
lt.put("video", true);
options.setCapability("LT:Options", lt);
WebDriver driver = new RemoteWebDriver(URI.create("https://hub.lambdatest.com/wd/hub").toURL(), options);
Own Grid (Docker)Cloud grid
Costyour serversmonthly subscription per parallel session
BrowsersChrome, Firefox, Edge on Linuxalso Safari, old versions, real phones
Debugginglogs, VNCvideo, screenshots, network logs per session
Data privacystays inside the companyneeds a tunnel for internal QA URLs (BrowserStack Local / LT Tunnel)

Note: Never commit access keys. Read them from environment variables that CI fills from secrets.