My code passes all tests on local environment but won’t pass test on CircleCI
Failures:
1) User registers invalid personal info and declined card
Failure/Error: visit register_path
Selenium::WebDriver::Error::WebDriverError:
unable to connect to chromedriver 127.0.0.1:9515
# ./spec/features/user_registers_spec.rb:5:in `block (2 levels) in <top (required)>'
Something wrong with selenium-webdriver on CircleCI?
this is my Gemfile
group :test do
gem 'database_cleaner', '1.4.1'
gem 'shoulda-matchers', '2.7.0'
gem 'vcr', '3.0.3'
gem 'webmock'
gem 'capybara'
gem 'capybara-email'
gem 'selenium-webdriver'
end
I installed chromedriver using brew, do I need to set up Circle yml file?
Are you using Circle 1.0 or 2.0? What config file are you using? At a guess you’d need to ensure that Selenium, Chrome and the ChromeDriver is on that box, and I imagine a config file is the way to do it.
Don’t forget you can run a build with SSH and try running your tests manually - if they don’t work, you can apt-get install stuff and then try again - it makes debugging a whole lot easier.
OK. Fail a build and debug via SSH? See if there are any logs left by Selenium or Chrome etc first. Then try launching Selenium in the foreground to see if it starts, etc.