---
title: Migrate Selenium and Appium tests from BrowserStack, Sauce Labs or LambdaTest
description: 'Move Selenium and Appium tests from BrowserStack, Sauce Labs or LambdaTest
  to TestingBot: the hub URL and credentials, a capability mapping to tb:options,
  and which test status commands keep working.'
source_url:
  html: https://testingbot.com/support/web-automate/selenium/migrate-from-other-clouds
  md: https://testingbot.com/support/web-automate/selenium/migrate-from-other-clouds.md
---

# Migrate from BrowserStack, Sauce Labs or LambdaTest

Selenium and Appium tests talk to a remote WebDriver endpoint, so they are not tied to one cloud. Moving a suite from BrowserStack, Sauce Labs or LambdaTest to TestingBot means changing three things:

1. the [remote URL and credentials](https://testingbot.com#endpoint),
2. the [vendor options block](https://testingbot.com#options) in your capabilities, which becomes `tb:options`,
3. a few [capability names](https://testingbot.com#mapping) inside that block.

Your WebDriver and Appium commands stay as they are, and so do most of the JavaScript executor calls you use to mark a test as passed or failed: the TestingBot hub [runs them as their TestingBot equivalent](https://testingbot.com#executors).

Moving local tests to the cloud for the first time? [Migrate your existing tests](https://testingbot.com/support/web-automate/selenium/migrate-existing-tests) covers that case.

## Hub URL and credentials

Point your tests at the TestingBot hub. Selenium and Appium use the same endpoint:

```bash
https://hub.testingbot.com/wd/hub
```

TestingBot authenticates with a **key and secret** , which you find in the [member area](https://testingbot.com/members/user/edit). Pass them in one of two ways:

- In the URL, the way most cloud setups already do it: `https://KEY:SECRET@hub.testingbot.com/wd/hub`. Your client sends them as HTTP Basic authentication.
- Inside `tb:options`, as `key` and `secret`.

If your code reads its credentials from environment variables, the quickest change is to point those variables at your TestingBot key and secret. Remove the old username and access key from the capabilities, so they are not sent along with the test.

## Rename the vendor options block to tb:options

In W3C capabilities, each cloud reads its own settings from a vendor-prefixed block: `bstack:options`, `sauce:options` or `LT:Options`. TestingBot reads `tb:options`. Rename the block, then rename the keys inside it with the [mapping table](https://testingbot.com#mapping) below. Settings left in another vendor's block are not applied.

[Python](https://testingbot.com#) [Java](https://testingbot.com#) [NodeJS](https://testingbot.com#) [Ruby](https://testingbot.com#) [C#](https://testingbot.com#)

```python
from selenium import webdriver

options = webdriver.ChromeOptions()
options.browser_version = 'latest'
options.platform_name = 'WIN11'
options.set_capability('tb:options', {
    'name': 'Checkout flow',
    'build': 'nightly-2026-11-16',
    'screen-resolution': '1920x1080',
    'idletimeout': 120,
})

driver = webdriver.Remote(
    command_executor='https://KEY:SECRET@hub.testingbot.com/wd/hub',
    options=options
)
```

```java
ChromeOptions options = new ChromeOptions();
options.setBrowserVersion("latest");
options.setPlatformName("WIN11");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", System.getenv("TB_KEY"));
tbOptions.put("secret", System.getenv("TB_SECRET"));
tbOptions.put("name", "Checkout flow");
tbOptions.put("build", "nightly-2026-11-16");
tbOptions.put("screen-resolution", "1920x1080");
tbOptions.put("idletimeout", 120);
options.setCapability("tb:options", tbOptions);

WebDriver driver = new RemoteWebDriver(
    new URL("https://hub.testingbot.com/wd/hub"), options
);
```

```javascript
const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');

const options = new chrome.Options();
options.setBrowserVersion('latest');
options.setPlatform('WIN11');
options.set('tb:options', {
  key: process.env.TB_KEY,
  secret: process.env.TB_SECRET,
  name: 'Checkout flow',
  build: 'nightly-2026-11-16',
  'screen-resolution': '1920x1080',
  idletimeout: 120
});

(async () => {
  const driver = await new Builder()
    .usingServer('https://hub.testingbot.com/wd/hub')
    .setChromeOptions(options)
    .build();
})();
```

```ruby
options = Selenium::WebDriver::Chrome::Options.new
options.browser_version = 'latest'
options.platform_name = 'WIN11'
options.add_option('tb:options', {
  'key' => ENV['TB_KEY'],
  'secret' => ENV['TB_SECRET'],
  'name' => 'Checkout flow',
  'build' => 'nightly-2026-11-16',
  'screen-resolution' => '1920x1080',
  'idletimeout' => 120
})

driver = Selenium::WebDriver.for(:remote,
  url: 'https://hub.testingbot.com/wd/hub',
  options: options
)
```

```csharp
ChromeOptions options = new ChromeOptions();
options.BrowserVersion = "latest";
options.PlatformName = "WIN11";
options.AddAdditionalOption("tb:options", new Dictionary<string, object>
{
    ["key"] = Environment.GetEnvironmentVariable("TB_KEY"),
    ["secret"] = Environment.GetEnvironmentVariable("TB_SECRET"),
    ["name"] = "Checkout flow",
    ["build"] = "nightly-2026-11-16",
    ["screen-resolution"] = "1920x1080",
    ["idletimeout"] = 120
});

IWebDriver driver = new RemoteWebDriver(
    new Uri("https://hub.testingbot.com/wd/hub"), options
);
```

The [capabilities generator](https://testingbot.com/support/web-automate/selenium/capabilities) builds this block for any browser and language.

## Capability mapping

The middle column lists names that test code written for other clouds commonly uses for each setting. Put the TestingBot name inside `tb:options`. Every TestingBot option is described on [Test Configuration Options](https://testingbot.com/support/web-automate/selenium/test-options) and, for mobile, [Appium options](https://testingbot.com/support/app-automate/appium/options).

| Setting | Names you may have now | TestingBot (in `tb:options`) |
| --- | --- | --- |
| Credentials | `userName`, `username`, `user`, `accessKey` | `key` and `secret`, or credentials in the URL ([see above](https://testingbot.com#endpoint)) |
| Test name | `sessionName`, `name` | `name` |
| Build | `buildName`, `build` | `build` |
| Project | `projectName`, `project` | `project` |
| Tags | `tags` | `groups`; `tags` is accepted too |
| Screen resolution | `resolution`, `screenResolution` | `screen-resolution`, for example `1920x1080` |
| Video recording | `video`, `recordVideo` | `screenrecorder`. On by default; set `false` to turn it off |
| Screenshots | `recordScreenshots` | `screenshot` |
| Idle timeout | `idleTimeout` | `idletimeout` (seconds); `idleTimeout` is accepted too |
| Maximum test duration | `maxDuration` | `maxduration` (seconds); `maxDuration` is accepted too |
| Selenium version | `seleniumVersion`, `selenium_version` | `selenium-version` |
| Appium version | `appiumVersion` | `appiumVersion` (same name) |
| Time zone | `timezone`, `timeZone` | `timeZone` |
| Tunnel | `local`, `localIdentifier`, `tunnel`, `tunnelName`, `tunnelIdentifier` | `tunnel-identifier`, with [TestingBot Tunnel](https://testingbot.com#tunnel) running |
| Physical device | `realMobile`, `isRealMobile` | `realDevice`: `true` |
| Uploaded app | `bs://…`, `storage:filename=…`, `lt://…` | `tb://…` after you [upload the app to TestingBot](https://testingbot.com/support/app-automate/help/upload), or a public URL |

Settings that only exist on another cloud (their own debugging, logging or network capture switches) have no TestingBot counterpart in this table. Remove them. What TestingBot records for every test, starting with a video, is described on [test results](https://testingbot.com/support/web-automate/selenium/test-results).

## Browser and operating system

The standard W3C capabilities `browserName`, `browserVersion` and `platformName` keep their names. Only the values can differ:

- **Operating system.** Use a TestingBot platform name in `platformName`, for example `WIN11`, `WIN10`, `SEQUOIA` or `SONOMA`. The names Selenium 4 sends, such as `Windows 11` and `macOS 14`, are translated. Do not split the OS into a family and a version (an `os` plus `osVersion` pair): TestingBot does not read the separate version, so `"Windows"` with `"11"` does not pin Windows 11. The full list is on the [browsers page](https://testingbot.com/support/web-automate/browsers).
- **Browser version.** A number, or `latest`, `latest-1`, `latest-2` and so on.
- **Edge.** `MicrosoftEdge`, `edge` and `microsoft edge` all select Edge.

## Mobile apps with Appium

Appium tests use the same hub URL. Keep the `appium:` capabilities you have (`appium:deviceName`, `appium:platformVersion`, `appium:automationName`), then:

- Upload your app to [TestingBot Storage](https://testingbot.com/support/app-automate/help/upload) and set `appium:app` to the `tb://` reference it returns.
- Set `realDevice: true` in `tb:options` to run on a physical device instead of a simulator or emulator.
- Check the device names you use against the [device selection](https://testingbot.com/support/app-automate/appium/options#device-selection) rules, since each cloud names its devices differently.

## Test status commands that keep working

Many suites report their result from inside the test with a JavaScript executor call. For Selenium and Appium sessions, the TestingBot hub recognises the common forms and does the equivalent [TestingBot action](https://testingbot.com/support/web-automate/selenium/status), so these calls need no changes:

| Call in your code | What TestingBot does |
| --- | --- |
| `browserstack_executor:` with action `setSessionStatus`, `lambdatest_executor:` with action `setTestStatus`, `lambda-status=passed` / `failed`, `sauce:job-result=passed` / `failed` | Marks the test passed or failed. A `reason` or `remark` becomes the status message |
| `browserstack_executor:` with action `setSessionName`, `lambda-name=…`, `lambdaUpdateName`, `sauce:job-name=…` | Renames the test |
| `lambda-build=…`, `sauce:job-build=…` | Files the test under that build |
| `lambda-test-tags=…`, `sauce:job-tags=…` | Adds tags (comma-separated) |
| `browserstack_executor:` with action `annotate`, `lambdatest_executor:` with action `stepcontext`, `sauce:context=…` | Adds a step to the test log |
| `browserstack_executor:` with action `getSessionDetails`, `lambdatest_executor:` with action `getTestDetails` | Returns the TestingBot session details as a JSON string: session and test id, name, build, status, browser, platform and a link to the test |
| `lambda-breakpoint=true`, `sauce:break` | Pauses the test so you can take over in the browser, like `tb:break` |

The `lambdatest_action:` and `lambda-hook:` prefixes are read the same way as `lambdatest_executor:`. Any other action with these prefixes is answered with success and does nothing, so it does not fail your test. A call whose JSON does not parse, or has no `action`, returns an error.

For new code, use the TestingBot form directly, for example `driver.execute_script('tb:test-result=passed')`, or set the result after the test with the [REST API](https://testingbot.com/support/api). Both are described on [Setting Name and Status](https://testingbot.com/support/web-automate/selenium/status).

## Playwright

Playwright tests connect to a different endpoint, `wss://cloud.testingbot.com/playwright`, described on [Playwright testing](https://testingbot.com/support/web-automate/playwright). That endpoint only understands `testingbot_executor` commands, so change the prefix of your status calls and pass the result as a boolean:

```javascript
await page.evaluate(_ => {}, `testingbot_executor: ${JSON.stringify({
  action: 'setSessionStatus',
  arguments: { passed: true, reason: 'Checkout completed' }
})}`)
```

`setSessionName` works the same way. More examples are on [mark Playwright test status](https://testingbot.com/support/web-automate/playwright/mark-test-status).

## Local and staging sites

If your tests reach a site that is not public, replace your current tunnel client with [TestingBot Tunnel](https://testingbot.com/support/tunnel). There are two ways to send a test through it:

- Point the test at the tunnel's local port, `http://localhost:4445/wd/hub`, instead of the hub URL.
- Keep the hub URL, start the tunnel with `--tunnel-identifier <id>` and set the same value as `tunnel-identifier` in `tb:options`. This is also how you pick one of [several tunnels](https://testingbot.com/support/tunnel/multiple).

A tunnel name or identifier from your previous provider has no meaning on TestingBot; replace it with the identifier you give TestingBot Tunnel.

## Migration checklist

- Remote URL set to `https://hub.testingbot.com/wd/hub`.
- TestingBot key and secret in the URL or in `tb:options`; old credentials removed.
- `bstack:options`, `sauce:options` or `LT:Options` renamed to `tb:options`, with keys renamed per the [mapping](https://testingbot.com#mapping).
- `platformName` set to a TestingBot platform; no separate OS version.
- Apps uploaded to TestingBot and referenced with `tb://`.
- Playwright status calls switched to `testingbot_executor`.
- One test run end to end, checked on the [dashboard](https://testingbot.com/members) for name, build and status.

If a test fails to start, the [test errors](https://testingbot.com/support/other/errors) page explains the messages the hub returns.

## Frequently asked questions

### Do I have to rewrite my tests to move them to TestingBot?

No. Your WebDriver and Appium commands stay the same. What changes is the remote URL, the credentials and the vendor options block in your capabilities, which becomes `tb:options`. See the [capability mapping](https://testingbot.com#mapping).

### Can I keep my bstack:options, sauce:options or LT:Options block?

No. TestingBot reads its settings from `tb:options`. Rename the block to `tb:options` and rename the keys inside it with the [mapping table](https://testingbot.com#mapping); settings left in another vendor's block are not applied.

### Do my existing setSessionStatus or sauce:job-result calls still work?

Yes, for Selenium and Appium. The TestingBot hub runs the common BrowserStack, LambdaTest and Sauce Labs JavaScript executor commands as their TestingBot equivalent: test status, name, build, tags and log annotations. See [test status commands](https://testingbot.com#executors).

### Does this also work for Playwright?

Partly. Playwright connects over a different endpoint, which only understands `testingbot_executor` commands. Change the prefix of your status calls to `testingbot_executor`. See [Playwright](https://testingbot.com#playwright).

### How do I test sites behind a firewall after migrating?

Replace your current tunnel client with [TestingBot Tunnel](https://testingbot.com/support/tunnel). Either point your tests at the tunnel's local port, or start the tunnel with `--tunnel-identifier` and set the same value as `tunnel-identifier` in `tb:options`.

## Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new) [Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
