【问题标题】:Running nightwatch tests on a create-react-app on travis在 travis 上的 create-react-app 上运行 nightwatch 测试
【发布时间】: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


    【解决方案1】:

    问题出在 Chrome 上,而不是 react 或 Nightwatch 的问题。

    https://github.com/travis-ci/travis-ci/issues/8836

    【讨论】:

      猜你喜欢
      • 2018-03-30
      • 2023-03-22
      • 2018-08-15
      • 1970-01-01
      • 2017-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-19
      相关资源
      最近更新 更多