Local Testing is a BrowserStack feature that helps you test mobile apps that access resources hosted in development or testing environments during automated test execution. This page will guide you through enabling Local Testing for App Automate sessions, and then using it to test apps that retrieve data from servers on your local machine, CI/CD machines/nodes, and other private network configurations.
Enabling Local Testing with App Automate is a simple two-step process:
You can establish a Local Testing connection through your command-line interface by following the steps below:
Download the BrowserStack Local binary for your system
The download links are secure. The binaries are digitally signed, identifying the publisher as
BrowserStack Limited for Mac users, and
BrowserStack Inc. for Windows.
./BrowserStackLocal --key YOUR_ACCESS_KEY
BrowserStackLocal.exe --key YOUR_ACCESS_KEY
After establishing the Local Testing connection, set
browserstack.local capability to true in your Appium test script. This will ensure that your app can access resources (e.g. API server) hosted in your development or testing environments during automated test execution on BrowserStack devices.
||Required if you are testing against internal/local servers||true/false
Default Value: false
DesiredCapabilities desiredCapabilities = new DesiredCapabilities(); desiredCapabilities.setCapability("browserstack.local", "true");
Contact our Support team for immediate help while we work on improving our docs.