我遇到问题在travis上的create-react-app服务器(npm start
)上运行nightwatch测试。我用
.travis.yml:
before_script:
- npm --prefix ./client start ./client &
script: npm run test-ci
然而,当守夜人跑步时,我总是得到
Starting the development server...
Starting selenium server... Warning: The 'no-use-before-declare' rule requires type information.
ts-loader: Using typescript@2.5.3 and /home/travis/build/client/tsconfig.json
started - PID: 4017
You can now view app in the browser.
Local: http://localhost:3000/
On Your Network: http://172.17.0.3:3000/
Note that the development build is not optimized.
To create a production build, use npm run build.
Error retrieving a new session from the selenium server
Connection refused! Is selenium server started?
{ Error: socket hang up
然而,起步&在当地运行夜间测试工作非常完美。
答案 0 :(得分:0)
问题在于Chrome,而不是反应或Nightwatch的问题。