微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决无法使用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 举报,一经查实,本站将立刻删除。