ng e2e on circleci-服务器提前终止,状态为127

时间:2019-01-10 09:18:18

标签: angular angular-cli e2e-testing circleci angular-e2e

我用角7 cli生成了一个全新的空白项目。第一步是设置Circle CI以测试项目。

当我在计算机上运行它时,没问题:

npm run lint
npm run e2e

测试成功。

所以我在我的circleci配置文件中放了同样的东西:

# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:8.12.0

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4

    working_directory: ~/new_project

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-

      - run: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      # run tests!
      - run: npm run lint
      - run: npm run e2e

CircleCi运行它时会失败:

[09:01:05] I/update - chromedriver: unzipping chromedriver_2.45.zip
[09:01:05] I/update - chromedriver: setting permissions to 0755 for /home/circleci/bailleur-indep-extranet/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.45
[09:01:05] I/launcher - Running 1 instances of WebDriver
[09:01:05] I/direct - Using ChromeDriver directly...
[09:01:05] E/launcher - Server terminated early with status 127
[09:01:05] E/launcher - Error: Server terminated early with status 127
at earlyTermination.catch.e (/home/circleci/bailleur-indep-extranet/node_modules/selenium-webdriver/remote/index.js:252:52)
at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:189:7)
  From: Task: WebDriver.createSession()
  at Function.createSession (/home/circleci/bailleur-indep-extranet/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
  at Function.createSession (/home/circleci/bailleur-indep-extranet/node_modules/selenium-webdriver/chrome.js:761:15)
  at Direct.getNewDriver (/home/circleci/bailleur-indep-extranet/node_modules/protractor/built/driverProviders/direct.js:77:33)
  at Runner.createBrowser (/home/circleci/bailleur-indep-extranet/node_modules/protractor/built/runner.js:195:43)
  at q.then.then (/home/circleci/bailleur-indep-extranet/node_modules/protractor/built/runner.js:339:29)
  at _fulfilled (/home/circleci/bailleur-indep-extranet/node_modules/q/q.js:834:54)
  at self.promiseDispatch.done (/home/circleci/bailleur-indep-extranet/node_modules/q/q.js:863:30)
  at Promise.promise.promiseDispatch (/home/circleci/bailleur-indep-extranet/node_modules/q/q.js:796:13)
  at /home/circleci/bailleur-indep-extranet/node_modules/q/q.js:556:49
  at runSingle (/home/circleci/bailleur-indep-extranet/node_modules/q/q.js:137:13)
  [09:01:05] E/launcher - Process exited with error code 199
  An unexpected error occurred: undefined

似乎测试角度过程的构建部分进展顺利,没有警告,没有错误,只有经典的构建角度日志。

版本: -节点:8.12.0 -@ angular / cli:7.2.0(在7.1.x中也发生,但也未解决) -npm:6.4.1

任何解决方法的想法吗?在此先感谢您的帮助和想法!

0 个答案:

没有答案