I`m having issues with phantomjs with my parallel testing, firefox is running fine. I use parallel_tests, watir-webdriver, and Cucumber.
No connection could be made because the target machine actively refused it. - connect(2) for "127.0.0.1" port 8910 (Errno::ECONNREFUSED)
Tests are running via:
parallel_cucumber features/parallel_tests -n 3
After some debugging I figured the problem appears when first process is finished with testing, it somehow kills all phantomjs browser instances.
This is env.rb setup:
browser = Watir::Browser.new :phantomjs, args: %w(--ignore-ssl-errors=true)
Before do
@browser = browser
@browser.cookies.clear
end
at_exit do
browser.close
end
I also tried not closing browser at all, but with no luck, it is somehow done automatically. I tried both Windows, and CentOS.
phantomjs -v
2.0.0
Using cucumber 1.3.19
Using selenium-webdriver 2.45.0
Using watir-webdriver 0.6.11
Using parallel 1.4.1
Using parallel_tests 1.3.9
I have a feeling it is a phantomjs/webdriver bug...