首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在bitbucket管道上运行e2e时出现问题

在bitbucket管道上运行e2e时出现问题
EN

Stack Overflow用户
提问于 2017-05-02 18:21:05
回答 2查看 889关注 0票数 1

我尝试为使用angular-cli开发的应用程序配置CI进程。

目前,我设法让管道运行karma测试,我的问题出在e2e (e2e-cli的“ng e2e”命令)上。

这是我的bitbucket _pipelines.yml:

代码语言:javascript
复制
image: node:7.6.0

pipelines:
 default:
   - step:
    script: # Modify the commands below to build your repository.
      - npm install -g @angular/cli
      - npm install
      - ng test --singleRun=true
      - ng e2e --env=prod

下面是流水线的输出:

代码语言:javascript
复制
[11:59:09] I/file_manager - creating folder /opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/webdriver-manager/selenium
[11:59:10] I/update - chromedriver: unzipping chromedriver_2.29.zip
[11:59:10] I/update - chromedriver: setting permissions to 0755 for /opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29
[11:59:10] I/launcher - Running 1 instances of WebDriver
[11:59:10] I/direct - Using ChromeDriver directly...
[11:59:10] E/launcher - Server terminated early with status 127
[11:59:10] E/launcher - Error: Server terminated early with status 127
    at earlyTermination.catch.e (/opt/atlassian/pipelines/agent/build/node_modules/selenium-webdriver/remote/index.js:252:52)
    at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/opt/atlassian/pipelines/agent/build/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
    at Function.createSession (/opt/atlassian/pipelines/agent/build/node_modules/selenium-webdriver/chrome.js:709:29)
    at Direct.getNewDriver (/opt/atlassian/pipelines/agent/build/node_modules/protractor/lib/driverProviders/direct.ts:90:25)
    at Runner.createBrowser (/opt/atlassian/pipelines/agent/build/node_modules/protractor/lib/runner.ts:225:39)
    at q.then.then (/opt/atlassian/pipelines/agent/build/node_modules/protractor/lib/runner.ts:391:27)
    at _fulfilled (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:796:13)
    at ./node_modules/protractor/node_modules/q/q.js:556:49
    at runSingle (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:137:13)
    at flush (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    [11:59:10] E/launcher - Process exited with error code 199
EN

回答 2

Stack Overflow用户

发布于 2017-05-02 20:11:16

看起来你正在通过一个驱动程序启动chrome,但是你没有安装chrome。chromedriver没有自带chrome。

我不确定你将如何解决这个问题,但是尝试在debug environment中安装chrome,看看它对你有没有帮助。

票数 1
EN

Stack Overflow用户

发布于 2017-05-17 01:08:46

最后使用下面的bitbucket-Pipelines.yml让它运行起来:

代码语言:javascript
复制
 image: versys650/angular-cli-for-e2e-tests

 pipelines:
   default:
    - step:
      script: # Modify the commands below to build your repository.
      - npm install    
      - ng test --singleRun=true
      - export DISPLAY=:1
      - Xvfb $DISPLAY -ac -screen 0 1280x1024x8 &
      - ng e2e --env=prod

希望它能帮助某些人。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43735495

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档