Chromedriver on OSX container

osx

#1

We are trying to use chromedriver on an OS X container to do our testing. chromedriver is communicated with using the url http://127.0.0.1:9515, however it appears that communicating with localhost is locked down entirely.

I created this sample project to easily show the problem:

https://circleci.com/gh/NewSpring/gagarin-circleci/15

You can see under “Test” that I first try to curl the url, and get the connection refused message. Then, you see the gagarin command, which is trying to communicate with the same url, also fails.

Does anyone have any direction on how we can accomplish this? Or, is it possible to get that type of thing opened up? I know on the standard linux containers you guys have this type of setup works just fine.

Thanks!


#2

https://circle-artifacts.com/gh/NewSpring/gagarin-circleci/15/artifacts/0/tmp/circle-artifacts.hxMrVnI/stderr_chromedriver_4449.txt

Looks like chromedriver never started, which might explain why it’s not listening on that port.

I’m not seeing where it’s installed, am I missing something? :smile:


#3

Good catch. Looks like it is able to access the chromedriver port now, but I’m still getting similar errors in the actual tests. https://circleci.com/gh/NewSpring/gagarin-circleci/19


#4

In case anyone else has this problem, here is how I got it to work:

machine:
  pre:
    - brew update; brew cleanup; brew cask cleanup
    - brew uninstall --force brew-cask; brew update
    - brew install brew-cask
    - brew install homebrew/versions/node010
    - curl https://install.meteor.com | sh
    - brew cask install google-chrome
    - brew install chromedriver

dependencies:
  pre:
    - npm install -g gagarin
    - chromedriver --port=9515:
       background: true

test:
  override:
    - gagarin -v -t 10000

#5