Learn how to test localhost and staging websites without publicly hosting them.
BrowserStack enables you to run automated tests on your internal development environments, on localhost, staging setups or from behind a corporate firewall. This feature is called Local Testing.
Local Testing establishes a secure connection between your machine and the BrowserStack cloud. Once you set up Local Testing, all your private URLs work out of the box, including HTTPS URLs and those behind a proxy or firewall.
First, you will need to download the Local binary. Choose one based on the operating system of your machine - OS X | Linux (32-bit) | Linux (64-bit) | Windows
Next, unzip the file that you downloaded, and establish the Local Testing connection using the following command in terminal/command prompt:
./BrowserStackLocal --key YOUR_ACCESS_KEY
BrowserStackLocal.exe --key YOUR_ACCESS_KEY
Once the connection is established, you can use local
key in the
connection_settings
option to specify the Local connection settings in the
browserstack.json
configuration file, like this:
...
{
"connection_settings": {
"local": true
}
}
...
Alternatively, you can set the environment variable BROWSERSTACK_LOCAL
to
true
. Note that the environment variable will override the options in your
browserstack.json
.
Contact our Support team for immediate help while we work on improving our docs.
Contact our Support team for immediate help while we work on improving our docs.
Thank you for your valuable feedback!