When you are looking to test a website on devices by using BrowserStack and need to log in through the VPN, this guide shows you how to set up Local Testing with BrowserStack Live.
If you’re using Chrome or Firefox to visit BrowserStack Live for the first time, you will see a prompt. This will guide you through the basic Local Testing setup for your environment.
Start a session and look for the green indicator on the ‘Local Testing’ icon in the toolbar dock to verify whether you’ve already enabled Local Testing on Live sessions.
If the Local Testing indicator is red, or you are using Local Testing with Live on a different browser / OS, you can set up Local Testing for your Live sessions by following the steps below.
Enable Local Testing
Select the OS and browser that you are using to access BrowserStack Live. Then, follow the setup instructions.
Warning: This is the OS & browser you are using to access BrowserStack Live, and NOT the browser you will open and test using Live.
Windows: Chrome and Firefox:
Search for the BrowserStack Local app on your machine. Local Testing will be enabled for your Live sessions if you have the app installed. There is no additional setup required.
If you don’t have BrowserStack Local app on your machine, download the BrowserstackLocal app (for Windows). Start the app, and you’ll see the following screen:
This enables Local Testing. Start a Live session and look for a green indicator on the Local Testing icon in the toolbar dock.
To resolve all requests to local URLs via your machine, click on the Local Testing icon and check the Resolve all URLs through my network option.
For example, suppose there is a URL like abc.com, which is restricted to your network, or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment. In that case, this option will resolve all abc.com requests from a remote browser/mobile device via your machine.
Windows: Other Browsers:
First, Download the BrowserStack Local binary for Windows.
Note: Note: The download links are secure. The binaries are digitally signed, identifying the publisher as BrowserStack Ltd.
Unzip the file to a folder/directory on your machine, open the command-line interface and navigate to the Local binary folder. Run the Local binary using the following command:
BrowserStackLocal.exe –key 5TgiLFAhuYxXRdrQScWR
This enables Local Testing for your Live sessions—as well as Screenshots. To verify, start a Live session on your browser and look for Local Testing in the toolbar dock. The green/red icon will indicate whether Local Testing for your session is enabled/disabled.
To resolve all requests to local URLs via your machine, establish the Local Testing connection with a –force-local flag, as follows:
BrowserStackLocal.exe –key 5TgiLFAhuYxXRdrQScWR –force-local
For example, if there is a URL like abc.com which is restricted to your network or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, this option will resolve all abc.com requests from remote browser/mobile device via your machine.
Note: Refer to our complete list of flags to set up Local Testing for other environments/network configurations. For Local Testing setup in common network configurations, skip to the next section: Use Local Testing with Live.
macOS: Chrome and Firefox:
Search for the BrowserStack Local app on your machine. Local Testing will be enabled for your Live sessions if you have the app installed. There is no additional setup required.
If you don’t have BrowserStack Local app on your machine, download the BrowserstackLocal app (for macOS / OS X). Click on the BrowserstackLocal.dmg and drag it to the Applications folder. Start the app, and you’ll see the following screen:
This enables Local Testing. Start a Live session and look for a green indicator on the Local Testing icon in the toolbar dock.
To resolve all requests to local URLs via your machine, click on the Local Testing icon and check Resolve all URLs through my network option.
For example, if there is a URL like abc.com which is restricted to your network or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, this option will resolve all abc.com requests from remote browser/mobile device via your machine.
macOS: Other Browsers:
First, Download the BrowserStack Local binary for macOS / OS X.
Note: Note: The download links are secure. The binaries are digitally signed, identifying the publisher as BrowserStack Ltd.
Unzip the file to a folder/directory on your machine, open the command-line interface and navigate to the Local binary folder. Run the Local binary using the following command:
./BrowserStackLocal –key 5TgiLFAhuYxXRdrQScWR
This enables Local Testing for your Live sessions—as well as Screenshots. To verify, start a Live session on your browser and look for Local Testing in the toolbar dock. The green/red icon will indicate whether Local Testing for your session is enabled/disabled.
To resolve all requests to local URLs via your machine, establish the Local Testing connection with a –force-local flag, as follows:
./BrowserStackLocal –key 5TgiLFAhuYxXRdrQScWR –force-local
For example, if there is a URL like abc.com which is restricted to your network or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, this option will resolve all abc.com requests from remote browser/mobile device via your machine.
Note: Refer to our complete list of flags to set up Local Testing for other environments/network configurations. For Local Testing setup in common network configurations, skip to the next section: Use Local Testing with Live.
Linux:
First, Download the appropriate BrowserStack Local binary for your system: Linux 32-bit | Linux 64-bit
Note: Note: The download links are secure. The binaries are digitally signed, identifying the publisher as BrowserStack Ltd.
Unzip the file to a folder/directory on your machine, open the command-line interface and navigate to the Local binary folder. Run the Local binary using the following command:
./BrowserStackLocal –key 5TgiLFAhuYxXRdrQScWR
This enables Local Testing for your Live sessions—as well as Screenshots. To verify, start a Live session on your browser and look for Local Testing in the toolbar dock. The green/red icon will indicate whether Local Testing for your session is enabled/disabled.
To resolve all requests to local URLs via your machine, establish the Local Testing connection with a –force-local flag, as follows:
./BrowserStackLocal –key 5TgiLFAhuYxXRdrQScWR –force-local
For example, if there is a URL like abc.com which is restricted to your network or you have /etc/hosts entry for abc.com mapping to localhost or an internal server/environment, this option will resolve all abc.com requests from remote browser/mobile device via your machine.
Note: To set up Local Testing for other environments/network configurations, refer to our complete list of flags. For Local Testing setup in common network configurations, skip to the next section: Use Local Testing with Live.
Disconnecting Local Testing
The Local Testing connection is persistent. Essentially, your machine and BrowserStack Cloud remain connected unless:
- You explicitly end the connection (for example, when using the binary)
- You close the browser window
- You sign out of your BrowserStack account.
Even if you accidentally close the browser tab, you can resume Local Testing on re-opening it.
For more details, you can refer: https://www.browserstack.com/docs/live/local-testing
Your blog is very informative.
Productive information Great.
Nice Blog Dear ! Very Informative !!
Nice Blog!!!