2

I have a requirement to test a site without making any google analytics hits. in order to do this I thought that I would use the BrowserStackLocal.exe to run my tests using the force local method. my understanding is that when I run this binary on a certain machine and set -forcelocal attribute then the ip that is used to access the website will be that of the local machine?! so I am running my tests from my CI enviornment using the following command, but all the ips are different and not what I am expecting.

# Download browserstack local zip
(New-Object Net.WebClient).DownloadFile('https://www.browserstack.com/browserstack-local/BrowserStackLocal-win32.zip','C:\projects\BrowserStackLocal-win32.zip');(new-object -com shell.application).namespace('C:\projects').CopyHere((new-object -com shell.application).namespace('C:\projects\BrowserStackLocal-win32.zip').Items(),16)
# create local connection
Start-Job {C:\projects\BrowserStackLocal.exe $env:BrowserStackAccessKey -forcelocal }
start-sleep 5
# run tests
Tools\NUnit.Parallel\ConsoleUnitTestsRunner.exe "C:\projects\cbre-testautomation\src\CBRE.Search.FunctionalTests\bin\$env:configuration\CBRE.Search.FunctionalTests.dll" -p=5 /xml=.\results.xml;
Farhad-Taran
  • 6,282
  • 15
  • 67
  • 121

0 Answers0