Skip to main content
No Result Found

Test websites hosted on private networks

Learn how BrowserStack Local Testing enables you to test localhost and staging websites

What is the use case?

Many a times, you would just want to setup the application server on localhost and run your automated tests against it for faster feedback without having to deploy it on staging servers. Even when you do, you might want to restrict the staging servers to your network or behind a firewall / a proxy.

While running your tests on BrowserStack, our browsers will not be able to reach your applications if they aren’t hosted on a publicly accessible server. To solve this, you can use our Local Testing feature to securely let our browsers reach your localhost / internal staging servers that aren’t otherwise publicly reachable.

Using Local Testing, you can test websites like http://localhost:3000 or https://staging.example.com without requiring them to be made accessible over the Internet. Remote browsers in the BrowserStack cloud will still be able to access your websites using this feature.

If your application is reachable over the public internet, you do not need Local Testing.

How does Local Testing work?

BrowserStack provides a Local Testing binary that you would need to run on your machine from where you can access your application. Usually, you’d run the binary on the same CI machine where your application server is running locally.

On initiating the binary, it creates a secure connection between that machine and the BrowserStack infra. The same connection is used to route traffic from BrowserStack’s browsers to your network and are resolved on the machine to run the tests seamlessly. Because of the way it is implemented, only your tests can use your connection - so you don’t have to worry about accidentally exposing your application to anyone else.

This schematic shows how Local Testing works:

Working of BrowserStack Local testing

You can set up Local Testing connection using this step-by-step guide

Useful resources for setting up Local Testing

The following links would guide you to proper resources that you might need to configure your Local Testing setup satisfactorily:

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle