无法使用Meteortesting找到Chrome二进制文件:mocha和selelnium docker

问题描述

我具有以下设置:

  1. 具有测试的流星应用
  2. 硒铬docker作为无头铬
  3. meteortesting:将摩卡咖啡作为测试运行器
  4. webdriverio控制无头Chrome

我的package.json:

"devDependencies": {
    "@wdio/allure-reporter": "^5.3.4","@wdio/cli": "^5.3.5","@wdio/jasmine-framework": "^5.3.2","@wdio/junit-reporter": "^5.3.1","@wdio/local-runner": "^5.3.5","@wdio/mocha-framework": "^5.16.15","@wdio/sauce-service": "^5.3.2","@wdio/selenium-standalone-service": "^5.2.2","@wdio/spec-reporter": "^5.2.3","@wdio/sync": "^5.3.2",// ... some Babel packages
    "bluebird": "^3.5.1","chai": "^4.1.2","chromedriver": "^79.0.0","circular-json-es6": "^2.0.1","cross-env": "^5.1.0","meteor-test-doubles": "git+https://github.com/okgrow/meteor-test-doubles.git","mocha": "^5.0.4","mockery": "^2.1.0","mongodb": "^2.2.33","mongoskin": "^2.1.0","node-simple-schema": "0.0.4","selenium-webdriver": "^3.0.0-beta-2","supertest": "^3.0.0","then-request": "^6.0.0","underscore": "^1.9.0","uuid": "^3.3.2","wdio-chromedriver-service": "^5.0.2","webdriverio": "^5.3.5","xmlhttprequest": "^1.8.0"
  },

在我们使用wdio testrunner和npm启动的摩卡运行测试之前。 一个webdriverio配置文件指定了可以访问selenium chrome docker的主机名。

exports.config = {
  hostname: 'http://selenium-chrome-standalone.example.de'
}

现在由于流星框架而导致一些导入问题,我们希望运行测试,因为它是“流星典型方式” https://guide.meteor.com/testing.html

所以我安装了:https://github.com/meteortesting/meteor-mocha

然后以meteor test --driver-package meteortesting:mocha开始测试,但我得到的只是:

WebDriverError: unkNown error: cannot find Chrome binary

我完全不知道如何通过这种方法传递配置文件或配置,或者告诉mocha / webdriver硒可访问的地方。

有人可以帮忙吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)