Skip to main content
Experience faster, smarter testing with BrowserStack AI Agents. See what your workflow’s been missing. Explore now!
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Configure proxy settings for Puppeteer tests

Set up a Local Testing connection for Puppeteer tests behind proxies on BrowserStack Automate. Test websites on 3000+ real browsers and devices.

This page is applicable if the website under test is behind a proxy. For e.g. if your website is hosted on https://localhost:3000 or any other similar private URL.

If the system from where you are invoking the test is also behind the same/different proxy, then please follow the running Puppeteer tests from behind a proxy documentation

If you have correctly set up Local Testing but are still unable to load your local/internally-hosted website/assets on BrowserStack, then you might be behind a proxy.

You can use Local Testing to test websites hosted behind proxies, on our remote browsers and devices. The setup will vary based on the proxy implementation in your network. Currently, we only support Local Testing through the following proxies:

  1. Proxy with no authentication or HTTP Basic Authentication.
  2. MITM proxy with no authentication or HTTP Basic Authentication.
  3. PAC (Proxy Auto-Configuration) with no authentication.

For Local Testing to work correctly, bypass traffic for bs-local.com in your proxy server.

Proxy

Proxies are commonly set up for office networks, remote servers, and sometimes on local machines. Contact your network/IT team to obtain the β€˜Proxy Host’ and β€˜Proxy Port’ to setup Local Testing for this implementation.

Once you obtain the Host and Port, you can establish a Local Testing connection using one of following ways:

If you are using the BrowserStack SDK, add the following snippet to your browserstack.yml file:

browserStackLocalOptions:
  proxyHost: your-proxy-host
  proxyPort: your-proxy-port
  proxyUser: your-proxy-username
  proxyPass: your-proxy-password

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