Pular para o conteúdo principal

Cloud Providers

The WebdriverIO MCP server has native support for running browser and mobile automation sessions on cloud device farms. No local drivers, emulators, or simulators required. Four providers are supported:

  • BrowserStackAutomate (browsers) and App Automate (mobile apps)
  • Sauce LabsSauce Labs real device cloud and virtual browsers
  • TestMu (formerly LambdaTest)TestMu real device and browser cloud
  • TestingBotTestingBot real device cloud and browser grid

All four providers share the same workflow: set credentials, optionally upload a mobile app, then call start_session with the provider name. Reporting labels, tunnel configuration, and mobile app lifecycle are identical across providers.

Prerequisites

Set your credentials as environment variables before starting the MCP server:

# BrowserStack
export BROWSERSTACK_USERNAME="your_username"
export BROWSERSTACK_ACCESS_KEY="your_access_key"

# Sauce Labs
export SAUCE_USERNAME="your_username"
export SAUCE_ACCESS_KEY="your_access_key"

# TestMu
export TESTMU_USERNAME="your_username"
export TESTMU_ACCESS_KEY="your_access_key"

# TestingBot
export TESTINGBOT_KEY="your_key"
export TESTINGBOT_SECRET="your_secret"
ProviderUsername VariableAccess Key VariableWhere to find
BrowserStackBROWSERSTACK_USERNAMEBROWSERSTACK_ACCESS_KEYAccount settings
Sauce LabsSAUCE_USERNAMESAUCE_ACCESS_KEYUser settings
TestMuTESTMU_USERNAMETESTMU_ACCESS_KEYAccount settings
TestingBotTESTINGBOT_KEYTESTINGBOT_SECRETAccount settings

Browser Automation

Run a browser session on any cloud provider by setting provider in start_session:

// BrowserStack — Windows + Chrome
start_session({
provider: "browserstack",
platform: "browser",
browser: "chrome",
browserVersion: "latest",
os: "Windows",
osVersion: "11"
})

// Sauce Labs — macOS + Safari
start_session({
provider: "saucelabs",
platform: "browser",
browser: "safari",
browserVersion: "latest",
os: "macOS",
osVersion: "Sequoia"
})

// TestMu — Linux + Firefox
start_session({
provider: "testmu",
platform: "browser",
browser: "firefox",
browserVersion: "latest",
os: "Linux"
})

// TestingBot — Windows + Chrome
start_session({
provider: "testingbot",
platform: "browser",
browser: "chrome",
browserVersion: "latest",
os: "Windows",
osVersion: "11"
})

All providers support browser: "chrome", "firefox", "edge", "safari". If you omit os / osVersion, the provider uses sensible defaults (typically latest Linux for browser sessions).

Sauce Labs Regions

Sauce Labs supports multiple data center regions. Set the region parameter in start_session:

start_session({
provider: "saucelabs",
platform: "browser",
browser: "chrome",
region: "us-west-1"
})

Supported values: "us-west-1", "eu-central-1" (default), "apac-southeast-1".


Mobile App Automation

The mobile workflow has three steps, identical across all providers:

Step 1: Upload your app

upload_app({ provider: "browserstack", path: "/absolute/path/to/app.apk" })
upload_app({ provider: "saucelabs", path: "/path/to/app.ipa" })
upload_app({ provider: "testmu", path: "/path/to/app.apk" })
upload_app({ provider: "testingbot", path: "/path/to/app.apk" })

Each returns an app reference you'll use in start_session:

  • BrowserStack: bs://abc123...
  • Sauce Labs: storage:filename=MyApp.ipa
  • TestMu: lt://abc123...
  • TestingBot: https://api.testingbot.com/v1/storage/<app_url>

You can optionally set a customId for stable references across uploads:

upload_app({ provider: "saucelabs", path: "/path/to/app.ipa", customId: "MyApp-v2.1" })

For Sauce Labs, add region to match your storage region (default "eu-central-1").

Step 2: List available apps

list_apps({ provider: "browserstack" })
list_apps({ provider: "saucelabs" })
list_apps({ provider: "testmu" })
list_apps({ provider: "testingbot" })

Optional parameters for all providers:

  • sortBy: "app_name" or "uploaded_at" (default)
  • limit: max results (default 20)

BrowserStack also supports organizationWide: true to list all org uploads. Sauce Labs accepts region.

Step 3: Start the session

Use the app reference from upload_app, or a customId:

// BrowserStack — Android
start_session({
provider: "browserstack",
platform: "android",
deviceName: "Samsung Galaxy S24",
platformVersion: "14.0",
app: "bs://abc123..."
})

// Sauce Labs — iOS
start_session({
provider: "saucelabs",
platform: "ios",
deviceName: "iPhone 15",
platformVersion: "17.0",
app: "storage:filename=MyApp.ipa"
})

// TestMu — Android
start_session({
provider: "testmu",
platform: "android",
deviceName: "Samsung Galaxy S24",
platformVersion: "14.0",
app: "lt://abc123..."
})

// TestingBot — Android
start_session({
provider: "testingbot",
platform: "android",
deviceName: "Samsung Galaxy S24",
platformVersion: "14.0",
app: "<app_url from upload_app>"
})

Local Tunnel

All three providers support a local tunnel so cloud sessions can reach servers on your machine (localhost, staging environments, internal services).

The MCP server uses a unified tunnel parameter that works identically across providers:

The MCP server starts and stops the tunnel automatically:

start_session({
provider: "browserstack",
platform: "browser",
browser: "chrome",
tunnel: true
})

Before your first session with tunnel: true, the MCP server handles downloading and starting the tunnel binary. If you want to verify setup manually, read the provider's local-binary resource:

  • wdio://browserstack/local-binary
  • wdio://saucelabs/local-binary
  • wdio://testmu/local-binary
  • wdio://testingbot/local-binary

The tunnel stops automatically when you close the session.

External tunnel

If you're already running the tunnel in a separate process:

start_session({
provider: "saucelabs",
platform: "browser",
browser: "chrome",
tunnel: "external",
tunnelName: "my-sauce-tunnel"
})

"external" tells the MCP server that a tunnel is already running; it sets the appropriate capability flags but doesn't start or stop any process. Set tunnelName to match the running tunnel.

Manual tunnel setup

If you prefer to run the tunnel manually, read the setup instructions from the MCP resource for your provider and platform. For example:

// Read setup instructions (from your AI client)
wdio://saucelabs/local-binary
wdio://testingbot/local-binary

Each resource returns the download URL, platform-specific commands, and daemon instructions.


Reporting

Tag sessions with project, build, and session labels for the provider's dashboard. This works identically across all three providers:

start_session({
provider: "browserstack",
platform: "browser",
browser: "chrome",
reporting: {
project: "My Project",
build: "v2.1.0",
session: "Login flow test"
}
})

Sessions appear in the provider's dashboard under the specified project and build:


Provider-Specific Notes

BrowserStack

  • Browser sessions: os accepts "Windows" or "OS X". Windows versions: "10", "11". macOS versions: "Ventura", "Sonoma", "Sequoia".
  • App management API: organizationWide: true on list_apps lists all team uploads.

Sauce Labs

  • Regions matter. The default region is eu-central-1. If your account is in a different region, set region on start_session, list_apps, and upload_app to match.
  • Mobile sessions support automationName ("XCUITest" or "UiAutomator2"); defaults are sensible per platform.
  • Sauce Connect tunnel is auto-managed via the saucelabs npm package. No external binary needed for tunnel: true.

TestMu

  • Provider name is "testmu" in start_session, list_apps, and upload_app.
  • Browser sessions connect to hub.lambdatest.com; mobile sessions connect to mobile-hub.lambdatest.com; this is handled automatically.
  • Tunnel is auto-managed via the @lambdatest/node-tunnel npm package.
  • Mobile app management fetches both Android and iOS apps via separate API calls, then merges the results.

TestingBot

  • Provider name is "testingbot" in start_session, list_apps, and upload_app.
  • Browser and mobile sessions both connect to hub.testingbot.com on port 443 (handled automatically).
  • Credentials use TESTINGBOT_KEY and TESTINGBOT_SECRET (not a username/access-key pair like the other providers).
  • Tunnel is auto-managed via the testingbot-tunnel-launcher npm package (requires Java 11+).
  • No region parameter — TestingBot's hub is global.
  • Mobile browser/emulator mode is supported: set platform: "android" or "ios" with a browser name (e.g., "chrome") instead of app.

Welcome! How can I help?

WebdriverIO AI Copilot