CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/cloud-grid-e2e

Author and run E2E tests on a cloud browser grid - BrowserStack Automate, Sauce Labs, or LambdaTest. All three follow one pattern: username + access-key env vars, a W3C WebDriver hub URL, a vendor options dict inside the capabilities (bstack:options / sauce:options / LT:Options), a local tunnel binary for internal apps, session pass/fail reporting, and a CI matrix throttled to the plan's parallel-session limit. Worked example uses BrowserStack; per-vendor deltas live in references/. Use for cross-browser regression on real devices + browsers beyond the engines bundled on the local machine - distinct from a local matrix runner and from self-hosted Selenium Grid.

72

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

lambdatest.mdreferences/

LambdaTest - vendor detail

Deep reference for cloud-grid-e2e. LambdaTest is a newer cloud-grid provider with strong real-device coverage and a SmartUI visual-testing add-on; like the others it exposes a W3C-compliant endpoint. Per lambdatest.com/support/docs/getting-started-with-lambdatest-automation (Cloudflare-protected; cite by stable URL).

Auth + hub URL

export LT_USERNAME="your-username"
export LT_ACCESS_KEY="<access-key>"

Hub: https://hub.lambdatest.com/wd/hub. Capabilities can be generated from the dashboard (lambdatest.com/capabilities-generator).

Capabilities (W3C)

{
  "browserName": "Chrome",
  "browserVersion": "latest",
  "platformName": "Windows 11",
  "LT:Options": {
    "user": "$LT_USERNAME",
    "accessKey": "$LT_ACCESS_KEY",
    "build": "PR-1234",
    "name": "Login flow on Chrome Windows",
    "project": "my-app"
  }
}

Full LT:Options table

OptionPurpose
user / accessKeyCredentials (alternative to env vars)
buildCI build / PR identifier
nameSession label
projectGroup sessions by project (dashboard)
selenium_versionPin Selenium version
w3cEnable W3C mode (default true)
consoleConsole-log level: "errors" / "warnings" / "info" / "verbose"
networkCapture HAR file
videoSession recording
visualPer-step screenshots
tunnel / tunnelNameLambdaTest Tunnel for internal apps
smartUI.projectLink to SmartUI visual-regression project

Python example

import os
from selenium import webdriver

options = webdriver.EdgeOptions()
options.browser_version = "latest"
options.platform_name = "Windows 11"

lt_options = {
    "user": os.environ["LT_USERNAME"],
    "accessKey": os.environ["LT_ACCESS_KEY"],
    "build": os.environ.get("BUILD_TAG", "local"),
    "name": "Checkout on Edge",
    "project": "my-app",
    "console": "errors",
    "network": True,
    "video": True,
}

# Vendor caps must be set on Options BEFORE Remote() ([Selenium options]).
options.set_capability("LT:Options", lt_options)

driver = webdriver.Remote(
    command_executor="https://hub.lambdatest.com/wd/hub",
    options=options,
)

driver.get("https://example.com")
# test...

# report pass / fail; LambdaTest's JS-executor pattern is "lambda-<command>=..."
failed = False
driver.execute_script("lambda-status=" + ("failed" if failed else "passed"))
driver.quit()

LambdaTest Tunnel

Per lambdatest.com/support/docs/lambda-tunnel - start the tunnel, then set LT:Options.tunnel: true and tunnelName: "my-tunnel":

./LT --user $LT_USERNAME --key $LT_ACCESS_KEY --tunnelName "my-tunnel"

SmartUI integration

SmartUI handles visual regression alongside the functional test (paid add-on; alternative to Percy / Chromatic in qa-visual-regression):

driver.execute_script("smartui.takeScreenshot=login-page")

Screenshots compare against a baseline; differences are flagged in the SmartUI dashboard. Approve the initial baseline or false positives flood reports.

Parsing results

Session reports: video (video: true), network HAR (network: true), console logs (console level), per-step screenshots (visual: true), SmartUI diffs (if configured). REST:

curl -u "$LT_USERNAME:$LT_ACCESS_KEY" \
  "https://api.lambdatest.com/automation/api/v1/sessions/<session-id>"

CI integration

on: pull_request
jobs:
  lambdatest:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        browser:
          - { name: Chrome, version: latest, platform: "Windows 11" }
          - { name: Firefox, version: latest, platform: "Windows 11" }
          - { name: Safari, version: "17", platform: "macOS Sonoma" }
    steps:
      - uses: actions/checkout@v6
      - name: Run on LambdaTest
        env:
          LT_USERNAME: ${{ secrets.LT_USERNAME }}
          LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
          LT_BROWSER: ${{ matrix.browser.name }}
          LT_VERSION: ${{ matrix.browser.version }}
          LT_PLATFORM: ${{ matrix.browser.platform }}
          BUILD_TAG: pr-${{ github.event.pull_request.number }}
        run: pytest tests/e2e/ --lambdatest

Vendor-specific anti-patterns

Anti-patternWhy it failsFix
Confusing tunnel (boolean) with tunnelName (string)Tunnel won't activateSet both when using tunnel
Missing project fieldDashboard organisation suffersAlways set project
Non-W3C mode (w3c: false)Parity issues; future versions remove itKeep w3c: true (default)
SmartUI baseline never approvedFalse positives flood reportsApprove initial baseline; audit changes

Vendor-specific limitations

  • Smaller real-device matrix than BrowserStack (improving).
  • SmartUI requires additional licensing.
  • Thinner docs on edge cases than the older competitors.
  • Pricing is per-parallel-session vs per-minute; cost analysis depends on workload shape.

SKILL.md

tile.json