browserstack / nightwatch-browserstack

Selenium examples for Nightwatch and BrowserStack Automate
https://www.browserstack.com
77 stars 62 forks source link

Local config is not going through my local network #34

Open winarun opened 4 years ago

winarun commented 4 years ago

Hi Guys,

I followed exactly the same code and tried to run parallel_local/local to have my Nightwatch test running in BrowserStack, it is running but network is NOT going through my local, so my night watch test is failing.

My understanding is giving config : 'browserstack.local': "true" + using the "local.running.js" (given my right key)...should run the test through my local network. But it is not happening.

Is any one gone through this issue? am i missing anything?

Please advise.

Thanks!Arun

shawnlobo96 commented 4 years ago

Hey @winarun

The Local testing binary fetches resources that are not publicly accessible through your network. In the case of public resources, it is fetched directly from the repeaters (https://www.browserstack.com/local-testing-internals).

You can, however, override this behavior using the force local flag in the binary.

Within local runner:

https://github.com/browserstack/nightwatch-browserstack/blob/a60b774d600b352f6a3f53fe4c311250e51a80bb/scripts/local.runner.js#L13

you can add the argument 'forceLocal': 'true'.

Refer: https://github.com/browserstack/browserstack-local-nodejs#force-local

This should force all traffic through your network.

In case you have any error while starting your test, can you share the exception stack trace?