【发布时间】:2018-05-14 15:24:49
【问题描述】:
我在 travis 上的 create-react-app 服务器 (npm start) 上运行 nightwatch 测试时遇到问题。我正在启动 creat-react-app
.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
但是,在本地启动和运行 nightwatch 测试非常完美。
【问题讨论】:
标签: continuous-integration travis-ci nightwatch.js create-react-app npm-scripts