I want to run a complete Selenium test within Travis, but I seem unable to get the server started.
My Travis YAML file
language: node_js
node_js:
- "6.2"
before_script:
- npm install selenium-standalone@latest -g
- selenium-standalone install
- npm install -g gulp
- nohup selenium-standalone start > selenium.txt 2>&1 </dev/null &
script:
- npm test
- gulp
When npm test runs, the result is:
Error retrieving a new session from the selenium server
Error: connect ECONNREFUSED 127.0.0.1:4444
at Object.exports._errnoException (util.js:1007:11)
at exports._exceptionWithHostPort (util.js:1030:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Connection refused! Is selenium server started?
npm ERR! Test failed. See above for more details.
nohup selenium-standalone startstarts the server in the Travis container. - Bob van Luijt