模具e2e测试在服务器上失败

时间:2019-01-28 15:02:31

标签: npm puppeteer e2e-testing stenciljs

我有一个带有单元测试和e2e测试的stenciljs项目,该项目在本地可以正常运行,但在服务器上失败并出现给定错误:

  

无法启动Chrome!产卵              /builds/header/node_modules/puppeteer/.local-chromium/linux-588429/chrome-linux/chrome              疑难解答:              https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md              错误:无法启动Chrome!产卵              /builds/header/node_modules/puppeteer/.local-chromium/linux-588429/chrome-linux/chrome              疑难解答:              https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md              在onClose              (/builds/header/node_modules/puppeteer/lib/Launcher.js:333:14)              在ChildProcess.helper.addEventListener.error              (/builds/header/node_modules/puppeteer/lib/Launcher.js:324:64)              在ChildProcess.emit(events.js:182:13)在              Process.ChildProcess._handle.onexit              (internal / child_process.js:238:12)在onErrorNT              (internal / child_process.js:407:16)在process._tickCallback              (internal / process / next_tick.js:63:19)

package.json:

...
"scripts": {
  ...
  "e2e": "stencil test --e2e",
  ...
},
,
"dependencies": {
  "@stencil/core": "^0.15.2",
  "@stencil/sass": "^0.1.1",
  "ionicons": "^4.4.6"
},
"devDependencies": {
  "@stencil/dev-server": "0.0.18",
  "@stencil/utils": "latest",
  "@types/jest": "23.3.4",
  "@types/node": "10.5.3",
  "@types/puppeteer": "1.6.0",
  "jest": "23.5.0",
  "license-checker": "^24.0.1",
  "mocky": "^0.1.11",
  "npm-run-all": "^4.1.5",
  "pixelmatch": "4.0.2",
  "puppeteer": "1.7.0",
  "rollup-plugin-node-builtins": "^2.1.2",
  "rollup-plugin-node-globals": "^1.4.0",
  "workbox-build": "3.4.1"
}

该构建正在使用gitlabRunner运行,当我寻找解决方案时,我发现puppeteer的较新版本(v1.8.0)就是这个问题,因此我将其修复为1.7.0 package.josn,但在执行测试期间正在更新:

  

模板测试--e2e

[28:43.7]请稍候,所需的依赖项已更新。这可能            会花一些时间,并且只需要初始            跑。 [28:43.7]安装依赖项:jest-cli,@ types / puppeteer,jest,puppeteer            ... npm WARN不推荐使用kleur@2.0.2:如果您希望使用旧语法,请升级到kleur @ 3或迁移到“ ansi-colors”。访问https://github.com/lukeed/kleur/releases/tag/v3.0.0\以获得迁移路径。

  

puppeteer@1.8.0安装/ builds / header / node_modules / puppeteer   节点install.js

铬已下载到/builds/header/node_modules/puppeteer/.local-chromium/linux-588429

  • jest@23.6.0
  • jest-cli@23.6.0
  • puppeteer@1.8.0
  • @ types / puppeteer @ 1.11.2 添加了1个软件包,删除了17个软件包,更新了23个软件包,并在50.353s中移动了23个软件包 [29:34.7]安装依赖项在51.00秒内完成

0 个答案:

没有答案