Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>Sauce Labs Plugin Alpha 1New to Visual Studio Code? Get it now.
Sauce Labs Plugin Alpha 1

Sauce Labs Plugin Alpha 1

Sauce Labs IDE Integration

|
4 installs
| (0) | Free
Access Sauce Labs Real Device Cloud and AI Test Authoring directly from VS Code - browse devices, start live sessions, view logs, run Appium tests, and author tests with AI.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sauce Labs Plugin for VS Code

Access the Sauce Labs Real Device Cloud from your editor: browse devices, start live sessions, view logs, and wire up Appium tests without leaving VS Code.

Status: Beta. See Known beta limitations below before filing issues.


What you can do

  • Browse every Sauce Labs real device in your region, filter by platform or private-device access, and search by model name.
  • Start a live device session with one click and interact with the screen (tap, swipe, hardware buttons, rotate).
  • Stream device logs, the Sauce-hosted Appium server log, and network traffic into the editor with color coding.
  • Capture PNG screenshots and MP4 recordings (recording requires ffmpeg).
  • See the session expiry countdown in the device-view header and Sessions sidebar — color-coded as the deadline approaches, with a warning toast five minutes before the session ends.
  • Auto-inject SAUCE_APPIUM_URL into new terminals and debug sessions so your local Appium tests run against the live device without code changes.
  • CodeLens in Java, Kotlin, Python, JavaScript, and TypeScript offering a one-click rewrite to read the URL from SAUCE_APPIUM_URL with a fallback.
  • AI Test Authoring. Write a test by describing it in plain English. Sauce Labs AI runs it on a live session and gives you back test code you can use. See the AI Test Authoring section below.

AI Test Authoring

Status: Beta. Available to Sauce Labs accounts that have AI Authoring turned on.

AI Test Authoring lets you write a test by describing it in plain English. You type what you want to test, the AI runs it on a live Sauce Labs session, shows you each step as it happens, and gives you back test code that you can use in your project.

What you can do

  • Write a test by typing a plain English prompt. You do not need to write code to start.
  • Choose Web or Mobile. For Web you give a website address and a browser. For Mobile you give a platform and a device.
  • Watch the steps appear in the panel one at a time as the AI runs them on a live session.
  • Get the result as test code that is ready to use.
  • Put the code into the file you have open, save it to a file in your workspace, or copy it to the clipboard.
  • Start and stop the device session from the panel whenever you want.

Quick start

  1. Sign in. See the Authentication setup section.
  2. Open the Sauce Labs Test Authoring view from the activity bar on the left.
  3. Pick Web or Mobile and fill in the target. For Web that is a website address and a browser. For Mobile that is a platform and a device.
  4. Type what you want to test in plain English. For example: open the demo site, log in, add the first item to the cart, and check out.
  5. Click Generate. The steps show up in the panel one by one. When it finishes you get the test code.
  6. Use Insert, Save, or Copy to keep the code.

Using it with a live device session

If you already have a device session open from the Devices panel, the form fills in that device's platform, version, and name for you. You can change any field. The form is never locked.

Saved test cases

Your generated tests are saved to your Sauce Labs account and shown in the panel. You can open them, run them again, rename them, edit them, or delete them from the editor.

Things to know during Beta

  • The generated code is Playwright for now. More frameworks are coming.
  • A test usually takes about 30 to 90 seconds to run against the real backend.

Prerequisites

  • VS Code 1.85 or newer.
  • A Sauce Labs account in one of the supported data centers (US West, US East, or EU Central). Grab your username and access key from the Sauce Labs user settings.
  • Node.js 20 or newer — only required if you're building the plugin from source; not needed to use it from the Marketplace.
  • ffmpeg on your PATH — only required for MP4 session recording. PNG screenshots, log streaming, and everything else work without it.
    • macOS: brew install ffmpeg
    • Linux: sudo apt install ffmpeg (or the equivalent for your distro)
    • Windows: download from ffmpeg.org and add bin/ to your PATH.

Installation

From the VS Code Marketplace

  1. Open the Extensions view (⇧⌘X on macOS, Ctrl+Shift+X on Windows/Linux).
  2. Search for Sauce Labs Plugin.
  3. Click Install.

From a .vsix file (beta early access)

  1. Download the latest .vsix from the beta distribution channel.
  2. In VS Code: Extensions → ⋯ menu → Install from VSIX… and select the file.

From source

git clone https://gitlab.tools.saucelabs.net/saucelabs/rdc/poc/vs-code-plugin
cd vs-code-plugin
npm install
npm run compile

Then press F5 in VS Code to launch an Extension Development Host with the plugin loaded.


Authentication setup

  1. Open the Sauce RDC view from the Activity Bar (the Sauce Labs icon).
  2. In the Account section at the top, click Log in. A form appears in the same panel.
  3. Pick the Data Center region that matches your account.
  4. Enter your User Name and Access Key, then click Log in again.

Credentials are stored in VS Code's secret store (macOS Keychain, Windows Credential Manager, or libsecret on Linux) — they're never written to the workspace or settings JSON.

To sign out, click Sign Out in the Account section (or run Sauce RDC: Sign Out from the Command Palette).


Region selection

All three Sauce Labs data centers are supported:

Region Host
US West (California) api.us-west-1.saucelabs.com
US East (Virginia) api.us-east-4.saucelabs.com
EU Central (Frankfurt) api.eu-central-1.saucelabs.com

You can switch regions three ways — whichever is more convenient:

  • Click a region row in the sidebar's Region section.
  • Pick one in the Region radio group on the sign-in form.
  • Run Sauce RDC: Select Data Center Region from the Command Palette.

Switching re-validates your credentials against the new region and refreshes the device + session lists automatically.


Starting a device session

  1. Sign in (above) and wait for the Devices list to populate. Each row shows the device name, OS version, and whether it's Public or Private.
  2. Click the ▶ play icon next to an available device (green dot), or right-click → Start Session.
  3. A new Sauce RDC: tab opens showing the live device screen. First frame arrives in 15–30 seconds after allocation.
  4. Interact with the device:
    • Click / drag for tap and swipe.
    • Home, Back (Android), App Switch (Android), and Rotate buttons live in the panel toolbar.
    • Use the toolbar buttons to take a screenshot, start a recording, or install an app (drag a .apk / .ipa onto the device or use the upload button).
  5. When you're done, click Stop in the toolbar or right-click the session in the Sessions sidebar and choose Close Session.

The panel watches the live countdown and closes itself automatically when the session reaches zero, so you don't end up interacting with a dead session. A warning toast fires five minutes before the deadline.


Appium integration

Run your local Appium tests against whichever device session you have open, without editing test code.

One-time setup

  1. Start a live session on the device you want to drive (above).
  2. Click Appium: OFF in the status bar (bottom left). It flips to Appium: <device name> to indicate injection is active.
  3. Open a new integrated terminal (Terminal → New Terminal). Terminals opened before you flipped the toggle won't have the variable — re-open them.
  4. Verify the variable is set:
    echo $SAUCE_APPIUM_URL
    
    You should see a URL like https://ondemand.us-west-1.saucelabs.com/wd/hub.

Make your test read SAUCE_APPIUM_URL

Open any .java, .kt, .py, .js, or .ts test file that constructs an Appium driver. A small "Add SAUCE_APPIUM_URL support" CodeLens appears above the line — click it to auto-rewrite to:

String appiumUrl = System.getenv("SAUCE_APPIUM_URL");
if (appiumUrl == null || appiumUrl.isEmpty()) {
    appiumUrl = "http://localhost:4723";
}
AppiumDriver driver = new AppiumDriver(new URL(appiumUrl), caps);

(Equivalent transforms land for Kotlin, Python, JavaScript, and TypeScript.)

Now your tests run against the live session when the toggle is on, and fall back to local Appium at localhost:4723 when it's off — no branching logic in your code.

Debug configurations

The extension also injects SAUCE_APPIUM_URL into launch configurations for ten supported debug adapter types (Node/TS, Python, Java, Kotlin, .NET, Go, Dart, Ruby) so Run & Debug picks it up the same way.


Commands

All commands are under the Sauce RDC category in the Command Palette.

Command What it does
Sauce RDC: Sign In Sign in via username + access key
Sauce RDC: Sign Out Clear credentials
Sauce RDC: Select Data Center Region Switch region
Sauce RDC: Refresh Devices Force a device-list refresh
Sauce RDC: Refresh Sessions Force a sessions-list refresh
Sauce RDC: Search Devices Filter by name substring
Sauce RDC: Filter Devices Filter by platform / private only
Sauce RDC: Start Session Pick a device and open a live session
Sauce RDC: Close Session Close a running session
Sauce RDC: Open Device View Open the live panel for a selected session
Sauce RDC: Toggle Appium Injection Toggle SAUCE_APPIUM_URL injection

Settings

Setting Default Description
sauceRdc.region US_WEST Persisted current region
sauceRdc.appiumInjection false Whether SAUCE_APPIUM_URL injection is active
sauceRdc.deviceFilter all Default device filter (all, apple, android, private)

Known beta limitations

  • Live sessions on public devices require a Sauce Labs admin account. Non-admin accounts (including most OAuth-issued tokens) can only open live sessions on private devices. The backend enforces this — the extension shows a Private vs Public label on every device so you know ahead of time which ones are openable. Public devices are still fully usable via automated Appium test runs.
  • No multi-touch / pinch gestures in the live session. Single-touch (tap, swipe, drag) works.
  • No in-panel hardware keyboard input — use on-screen keyboards for text entry for now.
  • MP4 recording requires ffmpeg on your PATH. Without it, recording fails with an error pointing to this README.
  • Large single-session recordings can consume significant disk space. There's no built-in cap yet.

If you hit something not listed here, please file an issue with the reproduction steps and a copy of the Output → Sauce RDC channel.


Troubleshooting

Extension didn't activate — "Cannot find module … dist/extension.js" You're running from source and forgot to build. Run npm run compile and reload the window.

npm install fails with ECONNREFUSED artifactory.tools.saucelabs.net The default npm registry in the internal Sauce network is behind VPN. Either connect to VPN or install against the public registry: npm install --registry=https://registry.npmjs.org/.

"There is no device that matches the query" You tried to open a live session on a public device from a non-admin account. See Known beta limitations.

New terminal doesn't have SAUCE_APPIUM_URL Appium injection is off, or you opened the terminal before flipping the toggle. Check the status bar reads Appium: <device> and open a fresh terminal.


Support

  • Bug reports / feature requests: file an issue in the plugin repo.
  • Sauce Labs platform support: help.saucelabs.com.
  • Documentation: see the Sauce Labs docs for platform-level topics (app storage, test configuration, organization & team settings).
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft