- Getting Started with Selenium for Automated Website Testing
- Getting Started with Appium for Mobile Native Application Testing
- Selenium Bootcamp by Dave Haeffner
- Appium Bootcamp by Dave Haeffner and Matthew Edwards
With Virtual USB for Real Devices, you can simulate connecting a real device via a USB cable directly to your local machine during a live or automated testing session. For mobile application and web browser testing, virtual USB lets you interact directly with a device in the Sauce Labs cloud via an integrated development environment like Android Studio and Xcode, or browser-based tools like Chrome DevTools and Safari Web Inspector. Because Virtual USB integrates into the development environment as if the device was directly connected to the workstation, you can also use homegrown developing and testing tools. With Virtual USB, you can directly monitor device performance metrics such as CPU consumption, device memory, and network data performance while debugging your native and web applications, and also build and deploy an application directly from the IDE.
- This feature is available only on Private Android devices
- Make sure you're using an ADV version that is above 1.0.39
Legacy Client Instructions
The information in this topic is for our latest Android Virtual USB Client release: v1.2. If you have a legacy version of the client (v.1.0 - v.1.1), check out Virtual USB instructions for legacy client versions
Download the Virtual USB Client
Launch and Connect Virtual USB to a Real Device Live Testing Session
Accessing Instructions in the Client
You can also find instructions for using the Virtual USB client by running
jar vusb-client.jar --help.
Download and install the Virtual USB for Live Testing client to the same machine where you have Android Studio installed. Java is required to run Virtual USB.
Get your User API key from the Account Settings menu in the Sauce Labs Real Device Cloud web interface.
Finding Your Real Device API Key
This is not the same as your project API key, and is specific to your Sauce Labs account.
From a command line, launch the client. You will have to choose between the EU or the US datacenter, depending on which device you are trying to connect to:
Once the server is open, you can now start a session. From another command line window, launch the client again using this command to create a new session:
When Virtual USB connects to your live testing session, it will return a success message and a link to watch the device running your test in real time.
Copy the port number and use it to connect adb to your session device using Virtual USB.
At this point vUSB is fully connected and you can use Android Studio (or Google Chrome's Remote Debugging) to debug your app, execute automation based on adb - or any other tool that is adb compliant. For example, using adb shell, you can start the camera of the connected device:
Closing a Virtual USB connection
Make sure you disconnect your device from ADB using
adb disconnect <IPAddress>:<portNumber>
- If open, close your SauceLabs device view in your browser.
Unsupported ADB commands
These ADB Commands are not supported for use with Sauce Labs Virtual USB