Sauce Labs Plugin for VS CodeAccess 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.
What you can do
AI Test Authoring
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
Quick start
Using it with a live device sessionIf 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 casesYour 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
Prerequisites
InstallationFrom the VS Code Marketplace
From a
|
| 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 Regionfrom the Command Palette.
Switching re-validates your credentials against the new region and refreshes the device + session lists automatically.
Starting a device session
- Sign in (above) and wait for the Devices list to populate. Each row
shows the device name, OS version, and whether it's
PublicorPrivate. - Click the ▶ play icon next to an available device (green dot), or right-click → Start Session.
- A new Sauce RDC: tab opens showing the live device screen. First frame arrives in 15–30 seconds after allocation.
- 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/.ipaonto the device or use the upload button).
- 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
- Start a live session on the device you want to drive (above).
- Click
Appium: OFFin the status bar (bottom left). It flips toAppium: <device name>to indicate injection is active. - Open a new integrated terminal (Terminal → New Terminal). Terminals opened before you flipped the toggle won't have the variable — re-open them.
- Verify the variable is set:
You should see a URL likeecho $SAUCE_APPIUM_URLhttps://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
ffmpegon yourPATH. 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).