ember-cli测试不使用docker中的phantomjs

时间:2017-05-03 19:37:36

标签: ember.js phantomjs ember-cli testem

运行ember test --host 172.17.0.2 --test-port 4450时,我收到以下错误。

Error: Browser failed to connect within 30s. testem.js not loaded?

由于我使用的是docker容器,我假设我需要将主机和端口更新为打开的docker主机和端口。

这是我的testem.js文件

/*jshint node:true*/
module.exports = {
  "framework": "qunit",
  "test_page": "tests/index.html?hidepassed",
  "phantomjs_debug_port": 4500,
  "disable_watching": true,
  "launch_in_ci": [
    "PhantomJS"
  ],
  "launch_in_dev": [
    "PhantomJS",
    "Chrome"
  ]
};

1 个答案:

答案 0 :(得分:0)

这是在连续集成环境中测试余烬应用程序时会遇到的一般问题。多个用户在此GitHub issue中发布了有关可能的错误的经验。我想到2个答案。

  1. 根据Testem的作者,您可以增加浏览器connection timeout

  2. 将ember应用程序的.travis.yml与ember-new-output存储库here中的规范版本进行比较。 ember-cli核心团队和社区成员投入了大量时间来完善和调试.travis.yml,以使其与ember应用程序良好配合。